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
WIP type annotations #1442
WIP type annotations #1442
Conversation
@@ -10,13 +10,13 @@ | |||
|
|||
import sys | |||
|
|||
from coverage.version import __version__, __url__, version_info | |||
from coverage.version import __version__ as __version__, __url__ as __url__, version_info as version_info |
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.
Why add these as
clauses? They're the same names they already were.
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.
In python typing, this nonsense is semantically understood as "re-export this import as a public member of the module".
I believe this crude hack was made because they didn't want to introduce any new syntax for typing.
It is mentioned in pep-484
I haven't looked at this closely, but do you have a way to run mypy as part of the tools? |
I'm unfamiliar with your project configuration ( |
Thanks for taking this all on. I added some details to the Contributing section of the docs about dependencies and |
What is the future of this pull request? It might be too hard to get everything type-checked, since the master branch is continuing development. Is there a way to get the tooling in place, and gradually make progress on adding the annotations? |
Hmm, sure. I could clean this up and get a minimal state ready to merge when I get time. |
@nedbat On Each PR had an entry on the mypy configuration file ( I can create a similar issue for coverage, and help to coordinate, if wanted. |
I started a more gradual approach. As of 212f652, four files on master are checked with mypy. I'd be happy to have help adding more files gradually, and eventually making the checks more strict and complete. I'll close this PR now, but feel free to re-open it if you can make this way work with the latest code. |
As of now (commit b059a67), all of the files in coverage/ and tests/ are checked by mypy. |
Very WIP
Contains:
addresses: #1434