Open eternal-sorrow opened 2 years ago
Have you had a look into the README.md
file examples?
# Using `db.Entity` directly won't work, as both MyPy and Pyright won't
# allow inheriting a class from a variable. For Pyright this declaration
# is enough misdirection for it not to complain, but MyPy needs an extra
# `type: ignore` comment above each model declaration to work.
DbEntity = db.Entity
# <example declarations>
For Pyright, I don't think any changes are necessary anymore. Mine doesn't complain about directly using db.Entity
.
mypy still does, though.
mypy
says: Name "db.Entity" is not defined