-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
feat: mypy for all type check #10921
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: yihong0618 <[email protected]>
It looks like a great piece of work! Just so you know, due to some historical reasons, the type annotations in the current codebase are not always accurate. Also, extra caution is needed when dealing with dict types from requests or the database. If you need any assistance, feel free to reach out to me. |
Additionally, according to our Contribution Guide, I recommend linking an issue to this PR to clarify your objective and avoid others submitting duplicate PRs. |
yes, maybe you can also push commit to this too, for the fixing them all, and I would create an issue for it |
Signed-off-by: yihong0618 <[email protected]>
For Flask-SQLAlchemy, I’d like to share our plan with you:
As a result, when encountering type-related issues, we can proceed with change 1 and temporarily ignore the errors caused by change 2. |
yes, this time I also choose ignore it, thanks for the info |
With my -1 for this PR.
|
some are right, but for now, I checked many of the bugs caused by the type, if not fix it by now, the code base grows, it will never be fixed. |
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
but this part I totally agree maybe even all the code happy, it should not in the CI, its too still some pain for everyone work on the mypy, so keep it on develop side maybe better
|
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Summary
This maybe a huge Pull Request, the main goal is to make all the
mypy
type check passed to fix the potential bugsSo its still WIP and will be draft. and try to close #10928
the first steps had beed done. -> let
mypy
work inapi
folder.And we fixed some of them,
you can check by
gh pr checkout 10921
when found small bug fix in main branch first
install mypy
cd api && mypy .
make it work for mypy
add ci for it
always merge main for the latest code
fixed them folder by folder, maybe type by type
for now after this commit it still has 4261 errors
some details update here:
@laipz8200 @crazywoola
Tip
Close issue syntax:
Fixes #<issue number>
orResolves #<issue number>
, see documentation for more details.Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods