-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Enable --check-untyped-defs for MyPy #27568
Comments
Yeah, but I still am trying to complete annotating DataFrame. Not getting much time after freelancing as well as working whole day at my full-time job. 😌 |
Will look into it after closing #26766 as I feel 26766 should have a higher priority. Also lot of issues from ☝️ will get resolved in 26766. |
Sure but I think for general contributors would take PRs for these whenever |
Yeah, lot of work in typing, we will need more contributers. |
@WillAyd Could I work on this issue? |
Sure. I would suggest picking one module to fix for now and submitting a PR for that |
no of errors for the relevant modules..
|
@WillAyd although even with the some other errors in other modules disappear too, making the todo list for this issue a little more manageable. so it might be worth forcing the upgrade to mypy 0.720 for the mypy checks. we should probably be pinning the mypy version anyway to avoid surprises https://mypy.readthedocs.io/en/latest/existing_code.html#continuous-integration at the moment, there would be 4 new errors that would break CI 304351e |
Sounds good. I'm not sure we need to really pin mypy - they release pretty quickly and I think good to stay with the latest as it comes out given this is a dev only dependency. Could revisit if something breaks CI drastically in the future |
yes they do on PyPi. but the conda enviroment does not seem to be keeping up. |
@WillAyd we now have mypy 0.720 in the ci. among other benefits we could now use inline configuration https://mypy.readthedocs.io/en/stable/inline_config.html#inline-configuration this could perhaps keep the setup.cfg file cleaner? in 6ea3407 a blacklist to enable setting we could now lockdown using a similar approach to c90c4ae and get thoughts? |
I would actually prefer to have things in setup.cfg rather than per module as it keeps everything in one place |
As brought up in a conversation with @simonjayhawkins we might want to consider adding
--check-untyped-defs
to the mypy config file. Right now unannotated functions are skipped so local variable inference and checking is not done until an annotation is added. Working through this flag in advance may lead to less surprises as annotations are addedNote that this can also be enabled globally and per module, so we could prioritize as needed. Docs here:
https://mypy.readthedocs.io/en/latest/config_file.html#untyped-definitions-and-calls
Here are failures currently on master. I haven't looked in detail but assume that the degree of difficulty to resolve will vary. PRs to tackle individual modules may be best
@vaibhavhrt something you may have interest in as well
The text was updated successfully, but these errors were encountered: