Describe the bug
Missing warning for unresolved reference.
To Reproduce
from typing import Optional
from pydantic import BaseModel
class Inner(BaseModel):
id: int
name: str
class Outer(BaseModel):
inner: Optional[Inner] = None
def test_():
actual = Outer()
assert actual.other
assert actual.inner.other
Expected behavior
PyCharm points out that other
is no field on inner
.
Compare with actual.other
where the unresolved reference is triggering a warning.
Environments (please complete the following information):
Additional context
Add any other context about the problem here.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too