-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix mypy errors #217
Comments
Nullable foreign keys cause 17 of the remaining 47 errors.
Sentry's Event is from a private module.
These from ActiveRecordMixin relate to fastapi/sqlmodel#348
Might be resolved by #356
|
Down to 15.
These from ActiveRecordMixin relate to fastapi/sqlmodel#348: 3
Need an Intersection type from Python python/typing#213: 2
Might be resolved by #376: 1
And the rest: 8
|
mypy --strict --show-error-codes app reportlab_mods.py
reports:Since FastAPI, Pydantic, etc. all rely heavily on type annotations, we should ideally fix most of these, and then
# type: ignore
any that we can't fix. Then, add a mypy workflow to prevent regressions:Correctable
Use
one
withfunc.max
instead offirst
(usingone
can probably be done a lot more throughout the code #218):These relate to
str.split
, so can probably be fixed:Might be easiest to split
respond_to_auth_challenge
into separate methods:Can be fixed by importing
_Environ
, but I don't like the idea of importing a private class:I know why this occurs (
dict()
is a method on SQLModel, to which ActiveRecordMixin is mixed), but not sure how to fix:Not sure what this attribute's type is, but can be annotated once known:
Not investigated yet
Not sure if this has a possible annotation that won't cause new errors:
Other miscellaneous:
FastAPI: None
These might be resolved by using a different model that doesn't allow None:
Miscellaneous None:
python/typing#213
fastapi/sqlmodel#654
I think upgrading to pydantic 2 #238 and adding this to
pyproject.toml
fixes these:fastapi/sqlmodel#348
Missing stub files
Fixed
#216
#214
#212
#199
FastAPI: Compatible models
cast()
for these.The text was updated successfully, but these errors were encountered: