Skip to content

Commit ba6aac3

Browse files
authored
Remove pre-commit from nox dev session (#201)
The `.pre-commit-config.yaml` will continue to hold helpful, self-correcting checks for use in pre-commit.ci. The expectation of running pre-commit locally is being removed.
1 parent 58366b9 commit ba6aac3

File tree

4 files changed

+2
-35
lines changed

4 files changed

+2
-35
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For use with pre-commit.ci - No expectation of use locally
12
ci:
23
autoupdate_schedule: monthly
34

@@ -6,27 +7,6 @@ repos:
67
- repo: https://github.com/pre-commit/pre-commit-hooks
78
rev: "v5.0.0"
89
hooks:
9-
- id: check-json
10-
- id: check-toml
11-
- id: check-yaml
1210
- id: trailing-whitespace
1311
- id: end-of-file-fixer
14-
- id: check-docstring-first
15-
16-
# Adds a standard feel to import segments
17-
- repo: https://github.com/pycqa/isort
18-
rev: 6.0.1
19-
hooks:
20-
- id: isort
21-
args:
22-
- "--force-single-line-imports"
23-
- "--add-import"
24-
- "from __future__ import annotations"
25-
- "--profile"
26-
- "black"
27-
28-
# Format code. No, I don't like everything black does either.
29-
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 25.1.0
31-
hooks:
32-
- id: black
12+
- id: mixed-line-ending

CONTRIBUTING.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,3 @@ nox -s update-deps
109109
```bash
110110
nox -s upgrade-deps
111111
```
112-
113-
---
114-
115-
## [pre-commit](https://pre-commit.com)
116-
117-
> A framework for managing and maintaining multi-language pre-commit hooks.
118-
119-
This repo is setup with a `.pre-commit-config.yaml` with the expectation that
120-
any code submitted for review already passes all selected pre-commit checks.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![Python 3.9 | 3.10 | 3.11 | 3.12 | 3.13](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/downloads)
22
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
3-
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
43

54
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Preocts/python-src-template/main.svg)](https://results.pre-commit.ci/latest/github/Preocts/python-src-template/main)
65
[![Python tests](https://github.com/Preocts/python-src-template/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/Preocts/python-src-template/actions/workflows/python-tests.yml)

noxfile.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ def dev(session: nox.Session) -> None:
7676

7777
python("pip", "install", "--editable", ".[dev,test]", *contraint, external=True)
7878

79-
python("pip", "install", "pre-commit", external=True)
80-
session.run(f"{venv_path}/pre-commit", "install", external=True)
81-
8279
if not os.environ.get("VIRTUAL_ENV"):
8380
session.log(f"\n\nRun '{activate_command}' to enter the virtual environment.\n")
8481

0 commit comments

Comments
 (0)