Repository navigation
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
Does this supersede #15794 ? |
|
Thank you for the question! It's more like this PR depends on #15794 rather than superseding it. These PRs are two of the three steps that we took for adding mypy to PlasmaPy's CI suite:
I wanted to separate the PRs in case there's a decision to take a different approach than #15794. |
| deps = | ||
| mypy | ||
| commands = | ||
| mypy {tox_root}/astropy --install-types --non-interactive |
There was a problem hiding this comment.
There are some packages that aren't typed themselves, but have created type stub packages that contain type information. The --install-types flag "causes mypy to install known missing stub packages for third-party libraries using pip", which means that mypy would have access to verified type information for packages like pandas, PyYAML, beautifulsoup4, etc. We could also manually add other type stub packages here, or otherwise specify mypy not to follow certain imports.
|
A follow-up to this exploratory PR: I mentioned in this post that it's worth considering alternatives to mypy such as pyright. |
|
@namurphy, I'm in favor of this! |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary. If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks! If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here. |
Blocked by:
This pull request would add a tox environment for running mypy for static type checking of type hint annotations. It could be run using:
This PR is based off of PlasmaPy/PlasmaPy#2431. A similar PR to add mypy to PlasmaPy's CI suite is PlasmaPy/PlasmaPy#2432. I'm not adding mypy to the CI suite in this PR because that would be a much bigger step than adding a tox environment.
This PR would need to go along with a PR to add a mypy configuration (e.g., #16312) that ignores all current errors, since running mypy without it leads to ∼1–2K errors (depending on the settings we choose).
There has been a great discussion about typing in #15170.