-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Make type checking mypy more straightforward for new contributors #11403
Comments
This was prompted by python#11403 This includes at least the following changes: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the several people who post on our gitter with a "I know Python, please help me contribute" message that doesn't really go anywhere - Consolidate contributing information in CONTRIBUTING.md
This was prompted by python#11403 This includes at least the following changes: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the several people who post on our gitter with a "I know Python, please help me contribute" message that doesn't really go anywhere - Consolidate contributing information in CONTRIBUTING.md
This was prompted by python#11403 This includes at least the following changes: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the somewhat common case of gitter posts like "I know Python, please help me contribute" that don't really go anywhere - Consolidate contributing information in CONTRIBUTING.md
This was prompted by python#11403 Changes include: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the somewhat common case of gitter posts like "I know Python, please help me contribute" that don't really go anywhere - Consolidate contributing information in CONTRIBUTING.md
This was prompted by python#11403 Changes include: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the somewhat common case of gitter posts like "I know Python, please help me contribute" that don't really go anywhere - Consolidate contributing information in CONTRIBUTING.md - Remove issue tracker conventions, since the template does a pretty good job and the rest is either common sense or never looked at
Thanks, I agree this isn't intuitive. Note that knowing to specify the config file is the bigger issue, since I think renaming the file to mypy.ini might cause issues with tests or something. But at the very least, this should be more clearly documented, which I've attempted to do in #11413 |
This was prompted by #11403 Changes include: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the somewhat common case of gitter posts like "I know Python, please help me contribute" that don't really go anywhere - Consolidate contributing information in CONTRIBUTING.md - Remove issue tracker conventions, since the template does a pretty good job and the rest is either common sense or never looked at
Yeah, I didn't realize this when I created the issue. I wasn't using the latest master so I didn't see the effects of #11258.
I'm guessing you're referring to these test failures that occur when I rename mypy_self_check.ini to mypy.ini:
All of these seem fixable if we change the current working directory to some other folder when running these tests. |
This was prompted by python#11403 Changes include: - General streamlining of markdown - Remove outdated references, e.g. to Python 2 / how to install Python 3 - Mention the "type school" discussions repo, typing-sig mailing list - Remove roadmap, since there isn't really a mypy core team anymore - More concretely link to "good first issue" page, etc. Hopefully this is a better experience than the somewhat common case of gitter posts like "I know Python, please help me contribute" that don't really go anywhere - Consolidate contributing information in CONTRIBUTING.md - Remove issue tracker conventions, since the template does a pretty good job and the rest is either common sense or never looked at
There are a couple pitfalls relating to type checking mypy itself that don't seem to be documented anywhere:
mypy .
andmypy mypy mypyc
both result in duplicate module errors that prevent further type checking. The correct way to run mypy ismypy -p mypy -p mypyc
, which doesn't appear to be documented anywhere (I only found this by looking at the tox.ini config file).I think the solution to 2 would be to rename mypy_self_check.ini to mypy.ini, because self checking mypy is significantly more common than compiling mypy with mypyc, so making mypy_self_check.ini the default config file seems reasonable.
For 1, we should at the very least document the command to run mypy in CONTRIBUTING.md. I think the ideal solution would involve changing the configuration file so that either
mypy .
ormypy mypy mypyc
just works correctly, the latter of which seems to be possible from my experiments by turning onnamespace_packages
and excluding mypyc/test-data.The text was updated successfully, but these errors were encountered: