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.
Screenshots
Environments (please complete the following information):
IDE: PyCharm 2024.1.1
OS: macOS 14.4.1
Pydantic Version 2.7.0
Plugin version 0.4.13
Additional context
Add any other context about the problem here.
Describe the bug Missing warning for unresolved reference.
To Reproduce
Expected behavior PyCharm points out that
other
is no field oninner
. Compare withactual.other
where the unresolved reference is triggering a warning.Screenshots
Environments (please complete the following information):
Additional context Add any other context about the problem here.