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

Document how to specify Black version when using a pre-commit hook #426

Closed
akaihola opened this issue Dec 21, 2022 · 0 comments · Fixed by #434
Closed

Document how to specify Black version when using a pre-commit hook #426

akaihola opened this issue Dec 21, 2022 · 0 comments · Fixed by #434
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@akaihola
Copy link
Owner

@victorcui96, I think each pre-commit hook installs into its own environment so modifying your project's requirements.txt will have no effect. The above referencing issue has a fix though, so applying that in your pre commit config would look like:

 - repo: https://github.com/akaihola/darker
   rev: 1.5.1
   hooks:
     - id: darker
       args:
          - --line-length=120
       language_version: python3
       additional_dependencies: [black==22.10.0]

Originally posted by @leej3 in #412 (comment)

@akaihola akaihola self-assigned this Dec 21, 2022
@akaihola akaihola added the documentation Improvements or additions to documentation label Dec 21, 2022
@akaihola akaihola added this to the 1.6.1 milestone Dec 21, 2022
@akaihola akaihola changed the title Document how to specify Black version when using the Darker GitHub Action Document how to specify Black version when using a pre-commit hook Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant