Describe the bug
Nested class definitions are being marked as of the latest version.
I'm pretty sure it wasn't a problem in 0.4.11, but I can't downgrade now as I've updated my PyCharm and 0.4.11 is not compatible with PyCharm 2024.1.
To Reproduce
You can use the following example code:
from pydantic import BaseModel
class Outer(BaseModel):
class Inner(BaseModel):
inner_attr: str
inner: Inner
outer_attr: str
outer = Outer(inner=Outer.Inner(inner_attr='foo'), outer_attr='bar')
The call to Outer.Inner
will be highlighted as a warning
Expected behavior
This should not be highlighted as an issue
Environments
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