-2

I am new to pre-commit and I am trying to implement Black with pre-commit.

The link to the documentation that I am following is given below.

https://pre-commit.com/#using-the-latest-version-for-a-repository https://medium.com/gousto-engineering-techbrunch/automate-python-code-formatting-with-black-and-pre-commit-ebc69dcc5e03

I followed every step in the second documentation (medium link) and wrote the .pre-commit-config.yaml file as below.

repos:
  - repo: <specific branch name (cannot show here)>
    rev: v2.8.0
    hooks:
      - id: black
        language_version: python3.9

when I try to push the commit, I am getting following error.

fatal: repository 'repo name' not found
Check the log at C:\Users\pre-commit.log

Please note that I want to apply Black pre-check and pre-commit to a single brach of the repository which is not master branch.

Does anyone know how to solve this error?

anthony sottile
  • 61,815
  • 15
  • 148
  • 207
  • 2
    Your hidden repo must be https://github.com/psf/black — it's the repo from which `pre-commit` fetches the hook(s). See a bigger example at https://stackoverflow.com/q/61669939/7976758 Found in https://stackoverflow.com/questions/tagged/pre-commit+python-black – phd Aug 29 '23 at 10:12

0 Answers0