FastAPI-template
FastAPI-template copied to clipboard
mypy errors in fastapi_users
Hi, I created project with fastapi_users and I've been getting mypy errors since the beginning. Does anyone know how to fix it?
my_project/web/api/users/views.py:3: error: Module "my_project.db.models.users" has no attribute "UserCreate" [attr-defined] from my_project.db.models.users import ( ^ my_project/web/api/users/views.py:3: error: Module "my_project.db.models.users" has no attribute "UserRead" [attr-defined] from my_project.db.models.users import ( ^ my_project/web/api/users/views.py:3: error: Module "my_project.db.models.users" has no attribute "UserUpdate" [attr-defined] from my_project.db.models.users import ( ^ my_project/web/api/users/views.py:3: error: Module "my_project.db.models.users" has no attribute "api_users" [attr-defined] from my_project.db.models.users import ( ^ my_project/web/api/users/views.py:3: error: Module "my_project.db.models.users" has no attribute "auth_cookie" [attr-defined] from psm_my_projectapi.db.models.users import ( ^ Found 5 errors in 1 file (checked 24 source files)
used namespace_packages = false will fix the users but not fully sure why namespace package is weird
got the same error
Can you try using fix from above?