-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Remove explicit annotaion for Mypy to infer type #32670
Conversation
Hah, static check is failing. Not unexpected. |
@uranusjr what's the status of this, can this be fixed/merged? Thanks! |
This allows task() to have the correct return type instead of being Any and make everything untyped.
b1a3597
to
e45623d
Compare
Needs another rebase after #35222 |
@uranusjr needs another rebase |
@uranusjr would love to see this merged! |
Note that Mypy is not happy about this change. If you would like this to go in, feel free to build on this change and make Mypy pass. |
Addresses issue #32384 by updating the return type of task() to the correct type, removing the 'Any' type and ensuring everything is properly typed. The initial inclusion of 'Any' in the return type is unclear, and though I'm uncertain of its original purpose, locally testing with Mypy shows compatibility with this change. Let's monitor the CI results to confirm its effectiveness across different environments. It's worth noting that Mypy has improved significantly over the past year, and this adjustment aligns with the ongoing efforts to enhance type safety. Your feedback and observations are welcome as we evaluate the impact of this modification. Thank you for bringing attention to this issue, and I look forward to collaborating on its resolution. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
This allows
task()
to have the correct return type instead of being Any and make everything untyped.I’m not sure why
Any
was added in the first place, but Mypy seems to be fine with this change locally on my machine, so let’s see how it goes in CI. It did improve a lot since a year ago.Fix #32384.