pre-commit.com Questions

2

Solved

I would like to add the following to pre-commit for a team: - repo: https://github.com/pre-commit/mirrors-mypy rev: 'v0.720' hooks: - id: mypy args: [--ignore-missing-imports] My team is wor...
Ardene asked 14/1, 2020 at 9:22

1

Solved

I use flake8 with a bunch of plugins (flake8-docstrings, flake8-isort, flake8-black). I have them all pre-installed into a venv. My repo to be checked with pre-commit: Root folder has two packages...
Cassiterite asked 4/3, 2021 at 20:36

1

Solved

Im using pyenv to support having different versions of python. In a project using python 3.7 I also want linting with pre-commit to run when doing code changes. But when the lint rules run, pre-com...
Telegenic asked 12/2, 2021 at 15:49

1

Solved

Is there already a pre-commit.com hook to reject commit if a file contains a specific string? I know how to do this with a git pre-commit hook: https://mcmap.net/q/681218/-git-hook-to-reject-commit...
Peloquin asked 12/2, 2021 at 10:36

1

Solved

I would like to use the exactly same version of flake8 in requirements.txt and in .pre-commit-config.yaml. To avoid redundancy I would like to keep the version number of flake8 exactly once in my r...
Prato asked 28/1, 2021 at 15:30

2

Solved

My pre-commit.com config looks like this: repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml -...
Beniamino asked 20/1, 2021 at 11:19

2

I'd like to run black to format all the staged .py files on a commit. Unfortunately due to employer network VPN and restrictions I'm unable to use the pre-commit package because it times out when t...
Laureen asked 20/11, 2020 at 19:18

1

I have a repo like this: myrepo/ .git tool1/ src/main.py tests/test.py .pre-commit-config.yaml Where the config is: repos: - repo: local hooks: - id: pytest-cov name: pytest coverage sta...
Isfahan asked 10/11, 2020 at 16:51

1

Solved

If I want to write a pre-commit hook to check that, e.g., the string "I love pre-commit" isn't anywhere in my source code, I could do - repo: local hooks: - id: love_statement name: Ch...
Hamm asked 13/10, 2020 at 16:14

1

Solved

Some hooks can take a while to run, and I would like to run those before I push, but not before each particular commit (for example, pylint can be a bit slow). I've seen the following: Question: U...
Wilmot asked 9/9, 2020 at 23:9

0

I am trying to launch my pre-commit hooks from "commit" button in PyCharm (v. 2020.2). I use a conda venv (created with conda create -n py38 python=3.8) where I installed modules with pip...
Diphosgene asked 31/8, 2020 at 1:7

1

I'm trying to setup pre-commit for a Python project's repository. Upon running pre-commit install I see an output like this: [INFO] Installing environment for https://github.com/asottile/seed-isort...
Pout asked 23/6, 2020 at 16:18

1

Solved

I was getting below error while committing the changes. Simply adding .pre-commit-config.yaml file or deleting .git\hooks folder was not resolving my problem. So I added --no-verify option while c...

1

Solved

I cloned a repository, installed pre-commit and was committing for the first time. This is the time when pre-commit packages actually get installed and setup. I faced the following issue. [INFO]...
Tercet asked 18/5, 2020 at 6:2

1

Solved

I'm running git pre-commit and running black as one of the hooks. Now when I run commit, black fails and says: All done! ✨ 🍰 ✨ 15 files reformatted, 1 file left unchanged. I reviewed the refor...
Unhallowed asked 8/5, 2020 at 0:21

1

Solved

When trying to install the Python dependencies with Poetry, I've the following error: $ poetry install The currently activated Python version 2.7.15 is not supported by the project (>=3.6). Tr...
Maccabean asked 27/3, 2020 at 9:14

1

Solved

I use pre-commit to handle git hooks for my git project. When I use it, the pre-commit run -a command keeps to skip the test execution: (smartexchange) trnbook:smartexchange ale$ pre-commit run un...
Bitolj asked 13/1, 2020 at 10:27

1

In my python project, I have pre-commit-config.YAML where I want to create my custom file. The intention of this file is fail git commit if python lint errors are greater than certain numbers. The...
Bangka asked 27/12, 2019 at 10:5

1

Please note that this question is about pre-commit.com tool and not about installing git-hooks. The tool uses a .pre-commit-config.yml in the root of your repository, one file that defines which h...
Enjoyment asked 26/11, 2019 at 9:46

1

I have a simple python project with a single file currently. It exists within the static/cgi-bin folder of my project. Currently, in the base of my directory, I have a .pre-commit-config.yaml file,...
Credit asked 14/2, 2019 at 19:23

1

Solved

I have a hook that generates documentation files from source files, built with the pre-commit.com framework. The function that is invoked in that hook does not have a file argument, so it simply cr...
Canikin asked 25/7, 2019 at 10:29

1

Solved

I'm following the office guidance to create and add a hook to the pre-commit check process. There are 3 files I need to create .pre-commit-config.yaml .pre-commit-hooks.yaml theCheckFile.sh ...
Geer asked 18/2, 2019 at 16:35

2

Solved

I use precommit with this .pre-commit-config.yaml file (extract) : - repo: https://github.com/pre-commit/pre-commit-hooks sha: v0.9.2 hooks: - id: trailing-whitespace - id: end-of-file-fixer ...
Douro asked 6/9, 2017 at 11:44

© 2022 - 2024 — McMap. All rights reserved.