Skip to content

Commit 91f3360

Browse files
committed
⬆️🧰 Update pre-commit
1 parent 93e9d2c commit 91f3360

2 files changed

Lines changed: 28 additions & 42 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [--in-place, --config, ./pyproject.toml]
2424

2525
- repo: https://github.com/tox-dev/pyproject-fmt
26-
rev: "v2.11.1"
26+
rev: "v2.14.0"
2727
hooks:
2828
- id: pyproject-fmt
2929

@@ -39,14 +39,14 @@ repos:
3939

4040
# Notebook tools
4141
- repo: https://github.com/kynan/nbstripout
42-
rev: 0.9.0
42+
rev: 186d22f
4343
hooks:
4444
- id: nbstripout
4545
args: [--drop-empty-cells]
4646

4747
- repo: https://github.com/astral-sh/ruff-pre-commit
4848
# Ruff version.
49-
rev: v0.14.14
49+
rev: v0.15.0
5050
hooks:
5151
- id: ruff
5252
name: "ruff sort imports notebooks"
@@ -88,7 +88,7 @@ repos:
8888

8989
- repo: https://github.com/astral-sh/ruff-pre-commit
9090
# Ruff version.
91-
rev: v0.14.14
91+
rev: v0.15.0
9292
hooks:
9393
- id: ruff
9494
name: "ruff sort imports"

pyproject.toml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,14 @@ docs = [
7575
"sphinxcontrib-mermaid>=0.9.2",
7676
]
7777

78-
[tool.hatch.version]
79-
path = "pyglotaran_extras/__init__.py"
80-
81-
[tool.hatch.build.targets.sdist]
82-
include = [
78+
[tool.hatch]
79+
build.targets.sdist.include = [
8380
"/pyglotaran_extras",
8481
"/docs",
8582
"/tests",
8683
"changelog.md",
8784
]
85+
version.path = "pyglotaran_extras/__init__.py"
8886

8987
[tool.docformatter]
9088
black = true
@@ -95,41 +93,31 @@ wrap-descriptions = 99
9593

9694
[tool.pydoclint]
9795
skip-checking-short-docstrings = false
98-
style = 'numpy'
99-
exclude = '^(docs/|tests?/)'
96+
style = "numpy"
97+
exclude = "^(docs/|tests?/)"
10098
require-return-section-when-returning-none = false
10199
allow-init-docstring = true
102100

103-
[tool.coverage.paths]
104-
source = [
101+
[tool.coverage]
102+
paths.source = [
105103
"pyglotaran_extras",
106104
"*/site-packages/pyglotaran_extras",
107105
]
108-
[tool.coverage.run]
109-
branch = true
110-
omit = [
111-
'tests/*',
112-
# comment the above line if you want to see if all tests did run
113-
]
114-
115-
[tool.coverage.report]
116106
# Regexes for lines to exclude from consideration
117-
exclude_lines = [
118-
# Have to re-enable the standard pragma
119-
'pragma: no cover',
120-
121-
# Don't complain about missing debug-only code:
122-
'def __repr__',
123-
'if self\.debug',
124-
125-
# Don't complain if tests don't hit defensive assertion code:
126-
'raise AssertionError',
127-
'raise NotImplementedError',
128-
129-
# Don't complain if non-runnable code isn't run:
130-
'if 0:',
131-
'if __name__ == .__main__.:',
132-
'if TYPE_CHECKING:',
107+
report.exclude_lines = [
108+
" Have to re-enable the standard pragm",
109+
" Don't complain about missing debug-only code",
110+
"if self\\.debug",
111+
" Don't complain if tests don't hit defensive assertion code",
112+
"raise NotImplementedError",
113+
" Don't complain if non-runnable code isn't run",
114+
"if __name__ == .__main__.:",
115+
"if TYPE_CHECKING:",
116+
]
117+
run.branch = true
118+
run.omit = [
119+
"tests/*",
120+
# comment the above line if you want to see if all tests did run
133121
]
134122

135123
[tool.mypy]
@@ -148,11 +136,9 @@ disallow_untyped_calls = true
148136
no_implicit_reexport = true
149137
warn_unused_configs = true
150138
check_untyped_defs = true
151-
152-
[[tool.mypy.overrides]]
153-
module = "tests.*"
154-
disallow_incomplete_defs = false
155-
disallow_untyped_defs = false
139+
overrides = [
140+
{ module = "tests.*", disallow_incomplete_defs = false, disallow_untyped_defs = false },
141+
]
156142

157143
[tool.interrogate]
158144
exclude = [

0 commit comments

Comments
 (0)