-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore[python]: Turn on mypy strict mode #4415
Conversation
See the comment in pyproject.toml. It basically means we have not changed that much, as we still ignore the warning. But there is not really a feasible way until PyO3 supports generating type annotations. Otherwise, maintaining stubs would just be a huge waste of resources, as it is duplicating the "outer" python api.
No need to add this to overrides, we can just do: [tool.mypy]
strict = true
warn_return_any = false I agree that manually adding stub files is overkill. |
That would override it for all modules, i.e. also numpy, pandas, etc. I would prefer to make the selection as small as possible. |
You're right; I didn't think this through 😄 We still need the ignore imports override though. So you could add an additional section of overrides with just the Polars package and the EDIT: Actually, you can't ignore |
Codecov Report
@@ Coverage Diff @@
## master #4415 +/- ##
==========================================
+ Coverage 78.98% 79.01% +0.02%
==========================================
Files 483 483
Lines 77094 77111 +17
==========================================
+ Hits 60895 60926 +31
+ Misses 16199 16185 -14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Python 3.7 test is fixed in #4416. |
I think you forgot to push your latest changes removing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🚀
That's quite an achievement. Well done. 👍 |
See the comment in pyproject.toml. It basically means we have not changed that much, as we still ignore the warning. But there is not really a feasible way until PyO3 supports generating type annotations. Otherwise, maintaining stubs would just be a huge waste of resources, as it is duplicating the "outer" python api.
Ticks the last box on the mypy list in #4044