Skip to content

Commit 4463857

Browse files
Add format-dedent as a pre-commit hook for dev
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/1947df4e-cdad-4916-86d5-16f97da22cf9
1 parent dda2e6a commit 4463857

3 files changed

Lines changed: 40 additions & 20 deletions

File tree

.pre-commit-config.yaml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,82 @@
11
minimum_prek_version: 0.2.23
22
repos:
3+
- repo: local
4+
hooks:
5+
- id: format-dedent
6+
name: format-dedent
7+
entry: uv run --frozen --offline format-dedent --write
8+
language: system
9+
types: [python]
10+
priority: 0
311
- repo: https://github.com/tsvikas/sync-with-uv
412
rev: v0.4.0
513
hooks:
614
- id: sync-with-uv
7-
priority: 0
15+
priority: 1
816
- repo: https://github.com/astral-sh/uv-pre-commit
917
rev: 0.10.9
1018
hooks:
1119
- id: uv-sync
12-
priority: 0
20+
priority: 1
1321
- id: uv-export
1422
args: ["--frozen", "--only-group=doc", "--output-file=docs/requirements.txt", "--quiet"]
15-
priority: 0
23+
priority: 1
1624
- repo: https://github.com/pre-commit/pre-commit-hooks
1725
rev: v5.0.0
1826
hooks:
1927
- id: check-added-large-files
20-
priority: 0
28+
priority: 1
2129
- id: check-case-conflict
22-
priority: 0
30+
priority: 1
2331
- id: check-merge-conflict
24-
priority: 0
32+
priority: 1
2533
- id: check-symlinks
26-
priority: 0
34+
priority: 1
2735
- id: check-yaml
28-
priority: 0
36+
priority: 1
2937
- id: debug-statements
30-
priority: 0
38+
priority: 1
3139
- id: name-tests-test
3240
args: [--pytest-test-first]
33-
priority: 0
41+
priority: 1
3442
- repo: https://github.com/abravalheri/validate-pyproject
3543
rev: v0.24.1
3644
hooks:
3745
- id: validate-pyproject
38-
priority: 0
46+
priority: 1
3947
- repo: https://github.com/tox-dev/pyproject-fmt
4048
rev: v2.11.1
4149
hooks:
4250
- id: pyproject-fmt
4351
args: [--max-supported-python=3.14]
44-
priority: 0
52+
priority: 1
4553
- repo: https://github.com/astral-sh/ruff-pre-commit
4654
rev: v0.14.3
4755
hooks:
4856
- id: ruff-check
4957
args: [--fix]
50-
priority: 0
58+
priority: 1
5159
- id: ruff-format
52-
priority: 0
60+
priority: 1
5361
- repo: https://github.com/DavidAnson/markdownlint-cli2
5462
rev: v0.22.0
5563
hooks:
5664
- id: markdownlint-cli2
5765
args: ["--fix"]
58-
priority: 0
66+
priority: 1
5967
- repo: https://github.com/rbubley/mirrors-prettier
6068
rev: v3.8.1
6169
hooks:
6270
- id: prettier
6371
types_or: [markdown]
64-
priority: 0
72+
priority: 1
6573
- repo: https://github.com/codespell-project/codespell
6674
rev: v2.4.1
6775
hooks:
6876
- id: codespell
6977
additional_dependencies:
7078
- tomli
71-
priority: 0
79+
priority: 1
7280
- repo: local
7381
hooks:
7482
- id: deptry
@@ -77,7 +85,7 @@ repos:
7785
language: system
7886
always_run: true
7987
pass_filenames: false
80-
priority: 1
88+
priority: 2
8189
- repo: local
8290
hooks:
8391
- id: import-linter
@@ -86,7 +94,7 @@ repos:
8694
language: system
8795
always_run: true
8896
pass_filenames: false
89-
priority: 1
97+
priority: 2
9098
- repo: local
9199
hooks:
92100
- id: ty
@@ -96,7 +104,7 @@ repos:
96104
types_or: [python, pyi]
97105
always_run: true
98106
require_serial: true
99-
priority: 1
107+
priority: 2
100108
default_stages:
101109
- pre-commit
102110
- pre-push

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ dev = [
5757
"codespell>=2.4.1",
5858
"datamodel-code-generator[http]>=0.35.0",
5959
"deptry>=0.23.0",
60+
"format-dedent>=0.1.1",
6061
"import-linter>=2.11",
6162
"jinja2>=3.1.6",
6263
"prek>=0.2.23",

uv.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)