Skip to content

Commit 8a7338b

Browse files
[pre-commit.ci] pre-commit autoupdate (#24)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <[email protected]>
1 parent 33beccb commit 8a7338b

File tree

4 files changed

+53
-27
lines changed

4 files changed

+53
-27
lines changed

.pre-commit-config.yaml

+32-10
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,33 @@ repos:
3535
- id: python-use-type-annotations
3636
- id: text-unicode-replacement-char
3737
- repo: https://github.com/asottile/pyupgrade
38-
rev: v2.37.1
38+
rev: v3.2.2
3939
hooks:
4040
- id: pyupgrade
4141
args: [--py37-plus]
4242
- repo: https://github.com/asottile/reorder_python_imports
43-
rev: v3.8.1
43+
rev: v3.9.0
4444
hooks:
4545
- id: reorder-python-imports
46+
- repo: https://github.com/asottile/setup-cfg-fmt
47+
rev: v1.20.0
48+
hooks:
49+
- id: setup-cfg-fmt
50+
exclude: |
51+
(?x)^(
52+
{{cookiecutter.project_slug}}/setup.cfg
53+
)$
4654
- repo: https://github.com/psf/black
47-
rev: 22.6.0
55+
rev: 22.10.0
4856
hooks:
4957
- id: black
50-
- repo: https://github.com/myint/docformatter
51-
rev: v1.3.1
58+
- repo: https://github.com/PyCQA/docformatter
59+
rev: v1.5.0
5260
hooks:
5361
- id: docformatter
5462
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
5563
- repo: https://github.com/PyCQA/flake8
56-
rev: 4.0.1
64+
rev: 5.0.4
5765
hooks:
5866
- id: flake8
5967
additional_dependencies: [
@@ -72,6 +80,16 @@ repos:
7280
pydocstyle,
7381
Pygments,
7482
]
83+
- repo: https://github.com/dosisod/refurb
84+
rev: v1.5.0
85+
hooks:
86+
- id: refurb
87+
args: [--ignore, FURB126]
88+
exclude: ({{cookiecutter.project_slug}})
89+
- repo: https://github.com/guilatrova/tryceratops
90+
rev: v1.1.0
91+
hooks:
92+
- id: tryceratops
7593
- repo: https://github.com/econchick/interrogate
7694
rev: 1.5.0
7795
hooks:
@@ -86,8 +104,12 @@ repos:
86104
"{{cookiecutter.project_slug}}/tests/test_import.py"
87105
]
88106
pass_filenames: false
107+
- repo: https://github.com/codespell-project/codespell
108+
rev: v2.1.0
109+
hooks:
110+
- id: codespell
89111
- repo: https://github.com/executablebooks/mdformat
90-
rev: 0.7.14
112+
rev: 0.7.16
91113
hooks:
92114
- id: mdformat
93115
additional_dependencies: [
@@ -97,7 +119,7 @@ repos:
97119
args: [--wrap, "88"]
98120
files: (README\.md)
99121
- repo: https://github.com/executablebooks/mdformat
100-
rev: 0.7.14
122+
rev: 0.7.16
101123
hooks:
102124
- id: mdformat
103125
additional_dependencies: [
@@ -112,7 +134,7 @@ repos:
112134
# path/to/file.py
113135
# )$
114136
- repo: https://github.com/codespell-project/codespell
115-
rev: v2.1.0
137+
rev: v2.2.2
116138
hooks:
117139
- id: codespell
118140
- repo: https://github.com/guilatrova/tryceratops
@@ -121,7 +143,7 @@ repos:
121143
- id: tryceratops
122144
exclude: "{{cookiecutter.project_slug}}/pyproject.toml"
123145
- repo: https://github.com/pre-commit/mirrors-mypy
124-
rev: 'v0.961'
146+
rev: 'v0.990'
125147
hooks:
126148
- id: mypy
127149
args: [

hooks/post_gen_project.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,21 @@
44
import shutil
55
import subprocess
66
import warnings
7+
from contextlib import suppress
78
from pathlib import Path
89

910

1011
def remove_file(*filepath: str | Path) -> None:
1112
"""Remove a file."""
12-
try:
13+
with suppress(FileNotFoundError):
1314
Path(*filepath).unlink()
14-
except FileNotFoundError:
15-
pass
1615

1716

1817
def remove_directory(*filepath: str | Path) -> None:
1918
"""Remove a directory."""
20-
try:
19+
with suppress(FileNotFoundError):
2120
path = Path(*filepath)
2221
shutil.rmtree(path)
23-
except FileNotFoundError:
24-
pass
2522

2623

2724
def main() -> None:

setup.cfg

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
2-
name = cookiecutter-pytask-project
2+
name = cookiecutter_pytask_project
33
description = A minimal cookiecutter template for a project with pytask.
4-
long_description = file: README.rst
5-
long_description_content_type = text/x-rst
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
66
url = https://cookiecutter-pytask-project.readthedocs.io/en/latest
77
author = Tobias Raabe
88
author_email = [email protected]
@@ -31,6 +31,8 @@ project_urls =
3131
Github = https://github.com/pytask-dev/cookiecutter-pytask-project
3232
Tracker = https://github.com/pytask-dev/cookiecutter-pytask-project/issues
3333

34+
[options]
35+
python_requires = >=3.7
3436

3537
[check-manifest]
3638
ignore =

{{cookiecutter.project_slug}}/.pre-commit-config.yaml

+13-8
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ repos:
2525
- id: python-use-type-annotations
2626
- id: text-unicode-replacement-char
2727
- repo: https://github.com/asottile/pyupgrade
28-
rev: v2.37.1
28+
rev: v3.2.2
2929
hooks:
3030
- id: pyupgrade
3131
args: [--py37-plus]
3232
- repo: https://github.com/asottile/reorder_python_imports
33-
rev: v3.8.1
33+
rev: v3.9.0
3434
hooks:
3535
- id: reorder-python-imports{% if cookiecutter.add_mypy == "yes" %}
3636
args: [--py37-plus, --add-import, 'from __future__ import annotations']{% endif %}
@@ -39,16 +39,16 @@ repos:
3939
hooks:
4040
- id: setup-cfg-fmt
4141
- repo: https://github.com/psf/black
42-
rev: 22.6.0
42+
rev: 22.10.0
4343
hooks:
4444
- id: black
45-
- repo: https://github.com/myint/docformatter
46-
rev: v1.3.1
45+
- repo: https://github.com/PyCQA/docformatter
46+
rev: v1.5.0
4747
hooks:
4848
- id: docformatter
4949
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
5050
- repo: https://github.com/PyCQA/flake8
51-
rev: 4.0.1
51+
rev: 5.0.4
5252
hooks:
5353
- id: flake8
5454
additional_dependencies: [
@@ -67,6 +67,11 @@ repos:
6767
pydocstyle,
6868
Pygments,
6969
]
70+
- repo: https://github.com/dosisod/refurb
71+
rev: v1.5.0
72+
hooks:
73+
- id: refurb
74+
args: [--ignore, FURB126]
7075
- repo: https://github.com/guilatrova/tryceratops
7176
rev: v1.1.0
7277
hooks:
@@ -91,7 +96,7 @@ repos:
9196
args: [--wrap, "88"]
9297
files: (README\.md)
9398
- repo: https://github.com/executablebooks/mdformat
94-
rev: 0.7.14
99+
rev: 0.7.16
95100
hooks:
96101
- id: mdformat
97102
additional_dependencies: [
@@ -106,7 +111,7 @@ repos:
106111
# path/to/file.py
107112
# )$
108113
{% if cookiecutter.add_mypy == "yes" %}- repo: https://github.com/pre-commit/mirrors-mypy
109-
rev: 'v0.961'
114+
rev: 'v0.990'
110115
hooks:
111116
- id: mypy
112117
args: [

0 commit comments

Comments
 (0)