Motor-ODM
Motor-ODM copied to clipboard
Mypy thinks Document class has type Any
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