Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive: Unresolved attribute reference 'mro' for class 'MyModel' #1019

Open
chbndrhnns opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@chbndrhnns
Copy link

Describe the bug
The pydantic inspection thinks that a model class has no mro() method. That's wrong:

from pydantic import BaseModel


class MyModel(BaseModel): ...


def test_():
    assert MyModel.mro() == [MyModel, BaseModel, object]

To Reproduce
Steps to reproduce the behavior:

  1. Run test

Expected behavior
Do not show the false positive warning.

Screenshots

Environments (please complete the following information):

  • IDE: PyCharm 2024.3
  • OS: macOS 14.6.1
  • Pydantic Version: 2.9
  • Plugin version: 0.4.16

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant