pre-commit

Pre-commit install-hooks does not work (SSLError)

Pre-commit install-hooks does not work (SSLError) Question: I use conda Python environments. Whenever I try to run pre-commit install-hooks, I get the error Could not fetch URL https://pypi.org/simple/ruamel-yaml/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443): Max retries exceeded w ith url: /simple/ruamel-yaml/ (Caused by SSLError("Can’t connect to HTTPS URL because the SSL …

Total answers: 1

pre-commit fails to install isort 5.11.4 with error "RuntimeError: The Poetry configuration is invalid"

pre-commit fails to install isort 5.11.4 with error "RuntimeError: The Poetry configuration is invalid" Question: pre-commit suddenly started to fail installing the isort hook in our builds today with the following error [INFO] Installing environment for https://github.com/pycqa/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes… An unexpected error …

Total answers: 5

Access python interpreter in VSCode version controll when using pre-commit

Access python interpreter in VSCode version controll when using pre-commit Question: I’m using pre-commit for most of my Python projects, and in many of them, I need to use pylint as a local repo. When I want to commit, I always have to activate python venv and then commit; otherwise, I’ll get the following error: …

Total answers: 2

running pre-commit python package in Windows gives ExecutableNotFoundError: Executable `/bin/sh`

running pre-commit python package in Windows gives ExecutableNotFoundError: Executable `/bin/sh` Question: I am working on a project where pre-commit==2.15.0 was added to the python requirements file. I installed the requirements. Now when I try to do a git commit I get the following error: An unexpected error has occurred: ExecutableNotFoundError: Executable `/bin/sh` not found Check …

Total answers: 1

The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed

The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed Question: I am having trouble with pre-commit and black. Everything worked fine until I cleared the cache with pre-commit clean. Now I always get the error The hook black requires pre-commit version 2.9.2 but version 2.6.0 is installed. Perhaps run `pip install –upgrade …

Total answers: 2