Skip to content

Commit ba1c473

Browse files
committed
Fixing so docs are skipped from formatting
1 parent f18e2f0 commit ba1c473

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# Then install the hooks within the repo:
44
# $ cd /PATH/TO/REPO
55
# $ pre-commit install
6-
6+
exclude: '^docs/code-comparisons/' # skip the code comparisons directory
77
repos:
88
- repo: https://github.com/ambv/black
9-
rev: 23.11.0
9+
rev: 24.1.1
1010
hooks:
1111
- id: black
1212
args: [--line-length=100, --exclude=docs/*]
@@ -22,15 +22,15 @@ repos:
2222
- id: check-ast
2323
# isort python package import sorting
2424
- repo: https://github.com/pycqa/isort
25-
rev: '5.12.0'
25+
rev: '5.13.2'
2626
hooks:
2727
- id: isort
2828
args: ["--profile", "black",
2929
"--line-length=100",
30-
"--extend-skip=docs/*/*/*.py",
30+
"--skip=docs/",
3131
"--known-local-folder",
3232
"tests", "-p", "hamilton"]
3333
- repo: https://github.com/pycqa/flake8
34-
rev: 6.1.0
34+
rev: 7.0.0
3535
hooks:
3636
- id: flake8

setup.cfg

+6
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ ignore =
1616
[isort]
1717
known_first_party=hamilton
1818
known_local_folder=tests
19+
skip=docs
20+
21+
[black]
22+
line-length = 100
23+
exclude = "docs/*.py"
24+
verbose = true

0 commit comments

Comments
 (0)