-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Easy way to run lint, black etc. (all fast checks) #15076
Comments
I think this is pretty easy to do with pre-commit, something like |
I agree with @hauntsaninja! pre-commit.ci has worked seamlessly at typeshed and really improved the contributing experience. It's very easy to enable it for a repo; just a matter of ticking a box in the repo settings to give it the necessary permissions. |
Yes, running black and isort automatically for PRs sounds like a good idea. That would address much of the friction. I think that this issue is still worthwhile, particularly for self check and lint, which often require manual action, but running black and isort is also pretty quick and by running them locally there won't be need to pull fixup commits . |
This makes it easier to maintain the configurations for the various linting tools we use in CI. It also makes it easier for contributors to run the linting tools locally. `black`, `isort` and `flake8` are all very fast checks, so I think it makes sense to just run them all together in `runtests.py`. With this PR, the following three invocations will all be equivalent: ``` pre-commit run --all-files python runtests.py lint tox -e lint ``` Closes #15076
Add an easy way to run
runtests.py self lint format-black format-isort
. Often one of these fails in CI, so running them locally is helpful, but currently it's too annoying. It could beruntests.py <something>
.The text was updated successfully, but these errors were encountered: