-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Single script to run PR checks locally #8686
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
Comments
I would prefer:
The CI will check everything anyway, and is set up so that you don't have to run anything locally. This would also be consistent with CONTRIBUTING.md. |
@Akuli I'm mainly asking this because of the constant back and forth this produces with pushing changes, waiting on the CI (which has additional overhead), opening the errors page and dropdowns, then searching for the error. I'd much rather be able to quickly run all autofixes and checks locally. My editor being VSCode, I could just setup a task for this project to run everything with the click of a single button. (but that's only gonna be beneficial to me) At the end of the day, it's not a major pain point, and most contributions will only include some changes in already compliant stubs. I just happened to be using quite a handful of popular untyped libraries of which most were not yet ready to include types directly. |
I think we can maybe do both. I agree with @Akuli that the language in But that doesn't mean that we can't also have a convenience script to e.g. run pycln/isort/black/flake8/mypy in quick succession, for contributors who want to run the tests locally first. |
After running
scripts/create_baseline_stubs.py
, we are informed of the followingThere's a few issues with running those commands as such:
MYPYPATH
environment variable and running a script afterward is done differently per shell (think of powershell for example, where its$Env:MYPYPATH="{stub_dir}"; python3 -m mypy.stubtest {package}
)METADATA.toml
,stubtest_allowlist.txt
, etc.For those reasons, I suggest adding a new script under
scripts
that a dev who's contributing to typeshed can run locally to easily and completely check their stubs. The documentation in CONTRIBUTING.md and the output ofscripts/create_baseline_stubs.py
should then be updated accordingly.The text was updated successfully, but these errors were encountered: