-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STYLE make black local hook run twice as fast #49947
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
@@ -36,6 +36,8 @@ jobs: | |||
|
|||
- name: Run pre-commit | |||
uses: pre-commit/[email protected] | |||
with: | |||
extra_args: --verbose --all-files |
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.
verbose
just shows the timings for each hook. --all-files
is the default extra_args
@@ -85,7 +85,7 @@ dependencies: | |||
- cxx-compiler | |||
|
|||
# code checks | |||
- black=22.3.0 | |||
- black=22.10.0 |
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.
at some point I'll address #46561
Just checking: this doesn’t assume anything about my dev encironment? |
that's right! |
This could maybe also be implemented by adding |
that doesn't work unfortunately, I get
|
@MarcoGorelli Ah, I guess black uses setuptools_scm or something so non-tagged versions are always dev+stuff (which makes sense). Thanks for giving it a shot! |
Thanks @MarcoGorelli |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Since https://ichard26.github.io/blog/2022/05/compiling-black-with-mypyc-part-1/ ,
black
runs twice as fast when the wheels are installed, compared with when it's built from source in the pre-commit hookEDIT: CI timings show 53.84s vs 131.85s, so this is more than a 2x improvement