pre-commit.com Questions
2
When i commit changes via Github Desktop, pre-commit cannot handle the changes and commit them but overwrites all other stages changes (the once i didn't intent to commit now) by its improvements.
...
Floorwalker asked 2/7 at 7:3
7
Solved
Problem Description
I'm having trouble making commits, when I try to make a commit with the command, for example:
$ git commit -m "add readme"
pre-commit not found. Install pre-commit wit...
Conny asked 24/6, 2022 at 12:58
3
When using https://pre-commit.com with VSCode hooks that depend on packages installed in a Python venv. In pre-commit on can specify to use "system" as environment. This works great from ...
Abner asked 15/10, 2020 at 10:18
4
Solved
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; otherwi...
Fuller asked 2/7, 2022 at 13:4
4
I tried to run this command but it always shows this error. Help me, please!
$ pre-commit install
[ERROR] Cowardly refusing to install hooks with `core.hooksPath` set.
hint: `git config --unset-all...
Schiedam asked 1/6, 2021 at 17:8
7
Solved
I'm trying to use pre-commit to manage Black as a Git pre-commit hook, but I must be doing it wrong.
In my pre-commit config file I have:
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
...
Moldy asked 15/10, 2019 at 16:24
4
My project structure looks like this:
project/
app/
main.py
venv/
.pylintrc
.pre-commit-config.yaml
When I am trying to edit project/app/main.py and it fails with
Unable to import 'psycopg2' ...
Fanciful asked 15/4, 2020 at 20:46
3
Solved
Running python pre-commit with black latest version 23.11.0 leads to a wired InvalidManifestError.
snippet from .pre-commit-config.yaml
repos:
- repo: https://github.com/psf/black
rev: 23.11.0
ho...
Mote asked 17/11, 2023 at 16:15
3
I'm hitting a snag installing pre-commit hooks. Based on the error below, the hook installation cannot find a python exe in the directory C:\\Users\\dangler\\.cache\\pre-commit\\repoith5dg7x\\py_en...
Lachrymose asked 8/12, 2020 at 2:40
2
Solved
I'm trying to write a pre-commit hook to my Django project that checks for missing migrations. That is, it ensures all changes are reflected in a migrations file.
One way to implement this is to PA...
Vehicle asked 14/12, 2020 at 6:47
3
Solved
I'm looking into this Python project template. They use poetry to define dev dependencies
[tool.poetry.dev-dependencies]
black = {version = "*", allow-prereleases = true}
flake8 = "*...
Bilbrey asked 26/11, 2021 at 16:49
2
I am looking for a configuration in the .pre-commit-config.yaml to exclude pre-commit from being run on certain branches, or to run it only on some branches. I don't know if this feature not implem...
Sulfamerazine asked 27/7, 2020 at 9:50
2
I am using pre-commit (version 2.20.0) for my C++ project with this hook:
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
I just staged ...
Ulphiah asked 12/10, 2022 at 18:50
2
Solved
I am on Python 3.10.4 here and using a .pre-commit-config.yaml file in my Poetry 1.1.13 project that uses pyproject.toml
Here is what my .pre-commit-config.yaml looks like
# See https://pre-commit....
Cookery asked 6/7, 2022 at 18:2
1
Solved
I'm looking for a way to run my pre-commit hooks on the currently active file in Pycharm without committing the file. I do not want to artificially add changes to the file and then commit it. The i...
Parthenon asked 20/4, 2023 at 8:43
1
Solved
Here is a .pre-commit-config.yaml from pre-commit.
It will git clone the specified rev of git repo.
How can I ignore the rev and always git clone the newest?
repos:
- repo: https://github.com/pre-c...
Delorenzo asked 3/4, 2023 at 14:13
5
Solved
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 th...
Vulgate asked 28/1, 2023 at 17:54
2
Solved
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 b...
Pregnable asked 19/5, 2021 at 9:45
2
[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 has occurred...
Bursarial asked 30/1, 2023 at 8:19
1
Solved
I've been using the pre-commit tool for years! and it's worked great until recently when it started failing with a mysterious error message:
$ pre-commit run flake8 --all-files
An error has occurre...
Invercargill asked 24/1, 2023 at 0:37
1
Solved
The pre-commit run suddenly fails without changes being made to the pre-commit configuration file. The log shows the following error message when attempting to initialise the environment for Flake8...
Qumran asked 18/12, 2022 at 19:17
1
I'm new to SQLFluff and am interested in a pre-commit check of changed files for rule violations. SQLFluff is working correctly, and to get it working with pre-commit I'm following the guide found ...
Inotropic asked 20/10, 2021 at 20:28
1
Solved
In my .pre-commit-config.yaml, I have the following config for mypy:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
args: [--strict]
additional_dependencies:...
Unreasoning asked 23/10, 2022 at 13:2
2
Solved
I am getting the below error when running "pre-commit run --all-files" and when trying to make a commit, it is some python error, python version in use is "Python 2.7.16".
[INFO...
Clerkly asked 28/2, 2022 at 6:20
1
Solved
I set up a pre-commit plugin for one of my projects.
Right now, the .pre-commit-config.yaml configuration file is located on the root of the project (as indicated by the official doc https://pre-co...
Genista asked 8/9, 2022 at 11:25
1 Next >
© 2022 - 2024 — McMap. All rights reserved.