-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Get successful MyPy pass for azure-core #5266
Conversation
Can one of the admins verify this patch? |
Codecov Report
@@ Coverage Diff @@
## azure-core #5266 +/- ##
==============================================
+ Coverage 49.63% 49.63% +<.01%
==============================================
Files 6372 6372
Lines 179206 179214 +8
==============================================
+ Hits 88944 88952 +8
Misses 90262 90262
Continue to review full report at Codecov.
|
@rakshith91 I am actually extremely new to MyPy, had been waiting to learn about it until later this year when other projects I run move to Python 3.5+. So you can help me understand a few things as I come up to speed:
|
|
By type more aggressively define type aliases, I mean only use this functionality more than we currently do: https://mypy.readthedocs.io/en/latest/kinds_of_types.html#type-aliases So, in the specific case above, maybe:
It seems like an alias for that would be both easier to parse (for a person) in the code, and also afford the ability to change things in one place instead of multiple places if the type is ever expanded or refined. Thanks for the explanation re: typeshed, personally I think judiciously turning off some checks for certain things is useful (I wouldn't want to have to add some noisy comment just to import We could definitely make follow-on issues to discuss these things separately outside this PR. |
Moved to #5466 Closing this as a duplicate. |
Resolves #5022