Skip to content

Commit 651612a

Browse files
[pre-commit.ci] pre-commit autoupdate (#32)
1 parent f8c7ea3 commit 651612a

File tree

8 files changed

+34
-28
lines changed

8 files changed

+34
-28
lines changed

.pre-commit-config.yaml

+4-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
args: [--branch, main]
2727
- id: trailing-whitespace
2828
- repo: https://github.com/pre-commit/pygrep-hooks
29-
rev: v1.9.0
29+
rev: v1.10.0
3030
hooks:
3131
- id: python-check-blanket-noqa
3232
- id: python-check-mock-methods
@@ -47,22 +47,17 @@ repos:
4747
{{cookiecutter.project_slug}}/setup.cfg
4848
)$
4949
- repo: https://github.com/psf/black
50-
rev: 22.12.0
50+
rev: 23.1.0
5151
hooks:
5252
- id: black
53-
- repo: https://github.com/PyCQA/docformatter
54-
rev: v1.5.1
55-
hooks:
56-
- id: docformatter
57-
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
5853
- repo: https://github.com/charliermarsh/ruff-pre-commit
59-
rev: v0.0.205
54+
rev: v0.0.241
6055
hooks:
6156
- id: ruff
6257
args: [hooks, tests]
6358
pass_filenames: false
6459
- repo: https://github.com/dosisod/refurb
65-
rev: v1.9.1
60+
rev: v1.10.0
6661
hooks:
6762
- id: refurb
6863
args: [--ignore, FURB126]

docs/source/changes.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
This is a record of all past cookiecutter-pytask-project releases and what went into
44
them in reverse chronological order.
55

6-
## 1.4.0 - 2023-xx-xx
6+
## 1.5.0 - 2023-02-04
7+
8+
- {pull}`33` fixes some small things. (Thanks to @hmgaudecker!)
9+
- {pull}`34` adds dependabot to update Github Actions.
10+
11+
## 1.4.0 - 2023-01-01
712

813
- {pull}`29` adds ruff and refurb to pre-commits and fixes CI banner.
914

hooks/post_gen_project.py

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def main() -> None:
6060
)
6161

6262
if "{{ cookiecutter.create_conda_environment_at_finish }}" == "yes":
63-
6463
if shutil.which("mamba") is not None:
6564
conda_exe = shutil.which("mamba")
6665
else:

hooks/pre_gen_project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main() -> None:
4545
raise ValueError(
4646
EXCEPTION_MSG_PYTHONVERSION.format(
4747
min_python_version=PYTHONVERSION_MIN, python_version=python_version
48-
)
48+
),
4949
)
5050

5151

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ extend-ignore = [
5252
"EM", # flake8-errmsg
5353
"ANN401", # flake8-annotate typing.Any
5454
"PD", # pandas-vet
55+
"COM812", # trailing comma missing, but black takes care of that
5556
]
5657

5758

5859
[tool.ruff.per-file-ignores]
5960
"tests/*" = ["D", "ANN"]
61+
"hooks/post_gen_project.py" = ["PLR0133"]
62+
"hooks/*" = ["INP001"]
6063

6164

6265
[tool.ruff.pydocstyle]

tests/test_cookie.py

+15-13
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
_PYTHON_VERSION = ".".join(map(str, sys.version_info[:2]))
99

1010

11-
@pytest.mark.end_to_end
11+
@pytest.mark.end_to_end()
1212
def test_bake_project(cookies):
1313
result = cookies.bake(
14-
extra_context={"project_slug": "helloworld", "python_version": _PYTHON_VERSION}
14+
extra_context={"project_slug": "helloworld", "python_version": _PYTHON_VERSION},
1515
)
1616

1717
assert result.exit_code == 0
@@ -20,13 +20,13 @@ def test_bake_project(cookies):
2020
assert result.project_path.is_dir()
2121

2222

23-
@pytest.mark.end_to_end
23+
@pytest.mark.end_to_end()
2424
def test_remove_readthedocs(cookies):
2525
result = cookies.bake(
2626
extra_context={
2727
"add_readthedocs": "no",
2828
"python_version": ".".join(map(str, sys.version_info[:2])),
29-
}
29+
},
3030
)
3131

3232
rtd_config = result.project_path.joinpath(".readthedocs.yaml")
@@ -39,10 +39,10 @@ def test_remove_readthedocs(cookies):
3939
assert "readthedocs" not in readme
4040

4141

42-
@pytest.mark.end_to_end
42+
@pytest.mark.end_to_end()
4343
def test_remove_github_actions(cookies):
4444
result = cookies.bake(
45-
extra_context={"add_github_actions": "no", "python_version": _PYTHON_VERSION}
45+
extra_context={"add_github_actions": "no", "python_version": _PYTHON_VERSION},
4646
)
4747

4848
ga_config = result.project_path.joinpath(".github", "workflows", "main.yml")
@@ -55,10 +55,10 @@ def test_remove_github_actions(cookies):
5555
assert "github/workflow/status" not in readme
5656

5757

58-
@pytest.mark.end_to_end
58+
@pytest.mark.end_to_end()
5959
def test_remove_tox(cookies):
6060
result = cookies.bake(
61-
extra_context={"add_tox": "no", "python_version": _PYTHON_VERSION}
61+
extra_context={"add_tox": "no", "python_version": _PYTHON_VERSION},
6262
)
6363

6464
ga_config = result.project_path.joinpath(".github", "workflows", "main.yml")
@@ -71,13 +71,13 @@ def test_remove_tox(cookies):
7171
assert not tox.exists()
7272

7373

74-
@pytest.mark.end_to_end
74+
@pytest.mark.end_to_end()
7575
def test_remove_license(cookies):
7676
result = cookies.bake(
7777
extra_context={
7878
"open_source_license": "Not open source",
7979
"python_version": _PYTHON_VERSION,
80-
}
80+
},
8181
)
8282

8383
license_ = result.project_path.joinpath("LICENSE")
@@ -88,7 +88,7 @@ def test_remove_license(cookies):
8888
assert not license_.exists()
8989

9090

91-
@pytest.mark.end_to_end
91+
@pytest.mark.end_to_end()
9292
@pytest.mark.skipif(os.environ.get("CI") is None, reason="Run only in CI.")
9393
def test_check_conda_environment_creation_and_run_all_checks(cookies):
9494
"""Test that the conda environment is created and pre-commit passes."""
@@ -98,7 +98,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
9898
"make_initial_commit": "yes",
9999
"create_conda_environment_at_finish": "yes",
100100
"python_version": _PYTHON_VERSION,
101-
}
101+
},
102102
)
103103

104104
assert result.exit_code == 0
@@ -108,7 +108,9 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
108108
# Switch branch before pre-commit because otherwise failure because on main
109109
# branch.
110110
subprocess.run(
111-
("git", "checkout", "-b", "test"), cwd=result.project_path, check=True
111+
("git", "checkout", "-b", "test"),
112+
cwd=result.project_path,
113+
check=True,
112114
)
113115

114116
# Check linting, but not on the first try since formatters fix stuff.

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
hooks:
4040
- id: setup-cfg-fmt
4141
- repo: https://github.com/psf/black
42-
rev: 22.12.0
42+
rev: 23.1.0
4343
hooks:
4444
- id: black
4545
- repo: https://github.com/PyCQA/docformatter
@@ -48,11 +48,11 @@ repos:
4848
- id: docformatter
4949
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
5050
{% if cookiecutter.python_version in ["3.10", "3.11", "3.12"] %}- repo: https://github.com/charliermarsh/ruff-pre-commit
51-
rev: v0.0.205
51+
rev: v0.0.241
5252
hooks:
5353
- id: ruff
5454
- repo: https://github.com/dosisod/refurb
55-
rev: v1.9.1
55+
rev: v1.10.0
5656
hooks:
5757
- id: refurb
5858
args: [--ignore, FURB126]

{{cookiecutter.project_slug}}/pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ extend-ignore = [
5555
"EM", # flake8-errmsg
5656
"ANN401", # flake8-annotate typing.Any
5757
"PD", # pandas-vet
58+
"COM812", # trailing comma missing, but black takes care of that
5859
]
5960

6061

6162
[tool.ruff.per-file-ignores]
6263
"tests/*" = ["D", "ANN"]
64+
"docs/source/conf.py" = ["INP001"]
6365

6466

6567
[tool.ruff.pydocstyle]

0 commit comments

Comments
 (0)