8000 Merge pull request #10205 from dhalbert/pre-commit-cleanup · adafruit/circuitpython@fc0c9ea · GitHub
[go: up one dir, main page]

Skip to content

Commit fc0c9ea

Browse files
authored
Merge pull request #10205 from dhalbert/pre-commit-cleanup
2 parents 4cfef7c + 23c4627 commit fc0c9ea

File tree

1 file changed

+40
-34
lines changed

1 file changed

+40
-34
lines changed

.pre-commit-config.yaml

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,33 @@
44

55
# CIRCUITPY-CHANGE: CircuitPython-specific.
66

7+
# Note that by default, pre-commit hooks do not look inside submodules.
8+
# So you don't need to exclude submodules explicitly here.
9+
710
repos:
8-
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
912
rev: v5.0.0
1013
hooks:
11-
- id: check-yaml
12-
- id: end-of-file-fixer
13-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/mimxrt10xx/sdk|ports/raspberrypi/sdk|lib/tinyusb)'
14-
- id: trailing-whitespace
15-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|ports/mimxrt10xx/sdk|lib/tinyusb)'
16-
- repo: https://github.com/codespell-project/codespell
14+
- id: check-yaml
15+
- id: end-of-file-fixer
16+
exclude: |
17+
(?x)^(
18+
tests/.*\.exp|
19+
tests/cmdline/.*|
20+
tests/.*/data/.*
21+
)
22+
- id: trailing-whitespace
23+
exclude: |
24+
(?x)^(
25+
tests/.*\.exp|
26+
tests/cmdline/.*|
27+
tests/.*/data/.*|
28+
lib/mbedtls_errors/generate_errors.diff
29+
)
30+
- repo: https://github.com/codespell-project/codespell
1731
rev: v2.2.4
1832
hooks:
19-
- id: codespell
33+
- id: codespell
2034
args: [-w]
2135
exclude: |
2236
(?x)^(
@@ -25,38 +39,30 @@ repos:
2539
tests/unicode/data/utf-8_invalid.txt|
2640
tests/extmod/data/qr.pgm|
2741
tests/basics/bytearray_byte_operations.py|
28-
ports/raspberrypi/sdk|
2942
ports/zephyr-cp/cptools/compat2driver.py
3043
)
31-
- repo: local
44+
- repo: local
3245
hooks:
33-
- id: translations
46+
- id: translations
3447
name: Translations
3548
entry: sh -c "if ! make check-translate; then make translate; fi"
3649
types: [c]
3750
pass_filenames: false
3851
language: system
39-
- id: formatting
52+
- id: formatting
4053
name: Formatting
41-
entry: python3 tools/codeformat.py
42-
types: [c]
43-
language: system
44-
exclude: |
45-
(?x)^(
46-
lib/tinyusb|
47-
ports/raspberrypi/sdk
48-
)
49-
- repo: https://github.com/astral-sh/ruff-pre-commit
50-
# Ruff version.
51-
rev: v0.9.4
52-
hooks:
53-
# Run the linter.
54-
- id: ruff
55-
args: [ --fix ]
56-
# Run the formatter.
57-
- id: ruff-format
58-
- repo: https://github.com/tox-dev/pyproject-fmt
59-
rev: "v2.5.0"
60-
hooks:
61-
- id: pyproject-fmt
62-
exclude: '^(ports/mimxrt10xx/sdk)'
54+
entry: python3 tools/codeformat.py -v -c
55+
language: python
56+
- repo: https://github.com/astral-sh/ruff-pre-commit
57+
# Ruff version.
58+
rev: v0.9.4
59+
hooks:
60+
# Run the linter.
61+
- id: ruff
62+
args: [ --fix ]
63+
# Run the formatter.
64+
- id: ruff-format
65+
- repo: https://github.com/tox-dev/pyproject-fmt
66+
rev: "v2.5.0"
67+
hooks:
68+
- id: pyproject-fmt

0 commit comments

Comments
 (0)
0