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

Mypy thinks Document class has type Any #28

Open
ThibaultLemaire opened this issue Sep 2, 2020 · 0 comments
Open

Mypy thinks Document class has type Any #28

ThibaultLemaire opened this issue Sep 2, 2020 · 0 comments

Comments

@ThibaultLemaire
Copy link

I get the following error from mypy when trying to define a document class

Class cannot subclass 'Document' (has type 'Any')

I'm using pydantic as well, so I have the pydantic plugin installed. I don't understand why it thinks Document has type Any, from looking at the code it's just a subclass of pydantic's BaseModel ...

I've set

disallow_subclassing_any = False

for my module for now, but I don't like it. Should I write a stub file or is this an issue that can be fixed directly in Motor-ODM ?

pydantic==1.5.1
motor-odm==0.1.dev0
mypy==0.782
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