-
-
Notifications
You must be signed in to change notification settings - Fork 144
Optionally run tests with mypy nightly #512
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
Conversation
Enabled mypy nightly on the CI by disabling unused ignore errors. |
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.
I'm OK with this, but I think we should add something to the documentation section about how we are handling the failures in the nightly and mypy-nightly CI runs.
My feeling is that if we have failures on either, we would still accept a PR, i.e., we are not expecting someone creating a PR for pandas-stubs that makes changes to the stubs to worry about the CI failing with those 2 jobs.
So can you add something to https://github.com/pandas-dev/pandas-stubs/blob/main/docs/tests.md about this new option, and also a paragraph related to what I wrote above?
|
||
# ignore unused ignore errors | ||
config_file = Path("pyproject.toml") | ||
config_file.write_text( |
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.
I don't really like changing pyproject.toml. I'll see whether there is a better way.
I'm also open to not run it on the CI - if there are errors that cannot be resolved by warn_unused_ignores
, it would be quite annoying to get a failed email for each PR.
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.
I don't really like changing pyproject.toml. I'll see whether there is a better way.
We could put the options used for the nightly tests in a mypy_nightly.ini
file and then do nightly with the mypy
option --config-file mypy_nightly.ini
. Then this allows us to turn off/on different options for the nightly.
I'm also open to not run it on the CI - if there are errors that cannot be resolved by
warn_unused_ignores
, it would be quite annoying to get a failed email for each PR.
If we use a special config file, then we just have to modify that config file
Thanks @twoertwein |
* CI: option to use mypy nightly * update pre-commit * skip ignores to run on CI * docs
Add an option to easily test the stubs with mypy nightly. Might be important to do that whenever mypy is close to a new release (especially if mypy advertises pandas-stubs, see python/mypy#14328).
Mypy nightly reports two unused ignores, so I didn't enable it on the CI.
poe --help
: