Skip to content
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

Allow specifying --workers via environment variable #3743

Merged
merged 6 commits into from
Jun 24, 2023

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jun 22, 2023

Fixes #3742

  • Add an entry in CHANGES.md if necessary?
  • Add new / update outdated documentation?

Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but this should also be mentioned in the documentation, maybe somewhere in https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html (which I think is rather different on main, I need to do a release sometime).

@github-actions
Copy link

github-actions bot commented Jun 22, 2023

diff-shades reports zero changes comparing this PR (9b9ee61) to main (c732a1f).


What is this? | Workflow run | diff-shades documentation

@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Jun 24, 2023

It looks like it will automatically have something added to that file from the --help:

<summary>CLI reference</summary>

  -W, --workers INTEGER RANGE     Number of parallel workers [default:
                                  BLACK_NUM_WORKERS environment variable or
                                  number of CPUs in the system]  [x>=1]

Should I document this somewhere beyond that? I don't see any other documentation about --workers and I'm not sure if there's a good existing section in the_basics.md

@hauntsaninja hauntsaninja marked this pull request as ready for review June 24, 2023 02:23
@hauntsaninja
Copy link
Collaborator Author

I guess I could make a new section below that called "environment variable options" and mention both this and BLACK_CACHE_DIR?

@JelleZijlstra
Copy link
Collaborator

I guess I could make a new section below that called "environment variable options" and mention both this and BLACK_CACHE_DIR?

Yes, sounds good!

@JelleZijlstra JelleZijlstra merged commit 7be2735 into psf:main Jun 24, 2023
@hauntsaninja hauntsaninja deleted the env-var branch July 16, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying --workers via environment variable
2 participants