Skip to content

Commit db27318

Browse files
[pre-commit.ci] pre-commit autoupdate (#6)
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 76a5d35 commit db27318

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

.pre-commit-config.yaml

+2-7
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ repos:
3434
- id: python-no-log-warn
3535
- id: python-use-type-annotations
3636
- id: text-unicode-replacement-char
37-
- repo: https://github.com/asottile/pyupgrade
38-
rev: v3.3.1
39-
hooks:
40-
- id: pyupgrade
41-
args: [--py37-plus]
4237
- repo: https://github.com/asottile/reorder_python_imports
4338
rev: v3.9.0
4439
hooks:
@@ -56,13 +51,13 @@ repos:
5651
rev: 22.12.0
5752
hooks:
5853
- id: black
59-
- repo: https://github.com/myint/docformatter
54+
- repo: https://github.com/PyCQA/docformatter
6055
rev: v1.5.1
6156
hooks:
6257
- id: docformatter
6358
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
6459
- repo: https://github.com/charliermarsh/ruff-pre-commit
65-
rev: v0.0.205
60+
rev: v0.0.212
6661
hooks:
6762
- id: ruff
6863
args: [hooks, tests]

tests/test_cookie.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88

99

10-
@pytest.mark.end_to_end
10+
@pytest.mark.end_to_end()
1111
def test_bake_project(cookies):
1212
major, minor = sys.version_info[:2]
1313
python_version = f"{major}.{minor}"
@@ -25,7 +25,7 @@ def test_bake_project(cookies):
2525
assert result.project_path.is_dir()
2626

2727

28-
@pytest.mark.end_to_end
28+
@pytest.mark.end_to_end()
2929
def test_remove_readthedocs(cookies):
3030
result = cookies.bake(extra_context={"add_readthedocs": "no"})
3131

@@ -39,7 +39,7 @@ 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(extra_context={"add_github_actions": "no"})
4545

@@ -53,7 +53,7 @@ def test_remove_github_actions(cookies):
5353
assert "github/workflow/status" not in readme
5454

5555

56-
@pytest.mark.end_to_end
56+
@pytest.mark.end_to_end()
5757
def test_remove_tox(cookies):
5858
result = cookies.bake(extra_context={"add_tox": "no"})
5959

@@ -67,7 +67,7 @@ def test_remove_tox(cookies):
6767
assert not tox.exists()
6868

6969

70-
@pytest.mark.end_to_end
70+
@pytest.mark.end_to_end()
7171
def test_remove_license(cookies):
7272
result = cookies.bake(extra_context={"open_source_license": "Not open source"})
7373

@@ -79,7 +79,7 @@ def test_remove_license(cookies):
7979
assert not license_.exists()
8080

8181

82-
@pytest.mark.end_to_end
82+
@pytest.mark.end_to_end()
8383
@pytest.mark.skipif(os.environ.get("CI") is None, reason="Run only in CI.")
8484
def test_check_conda_environment_creation_and_run_all_checks(cookies):
8585
"""Test that the conda environment is created and pre-commit passes."""

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ repos:
2424
- id: python-no-log-warn
2525
- id: python-use-type-annotations
2626
- id: text-unicode-replacement-char
27-
- repo: https://github.com/asottile/pyupgrade
27+
{% if cookiecutter.python_version not in ["3.10", "3.11", "3.12"] %}- repo: https://github.com/asottile/pyupgrade
2828
rev: v3.3.1
2929
hooks:
3030
- id: pyupgrade
31-
args: [--py37-plus]
31+
args: [--py{{ cookiecutter.python_version | replace('.', '') }}-plus]
32+
{% endif %}
3233
- repo: https://github.com/asottile/reorder_python_imports
3334
rev: v3.9.0
3435
hooks:
@@ -42,13 +43,13 @@ repos:
4243
rev: 22.12.0
4344
hooks:
4445
- id: black
45-
- repo: https://github.com/myint/docformatter
46+
- repo: https://github.com/PyCQA/docformatter
4647
rev: v1.5.1
4748
hooks:
4849
- id: docformatter
4950
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
5051
{% if cookiecutter.python_version in ["3.10", "3.11", "3.12"] %}- repo: https://github.com/charliermarsh/ruff-pre-commit
51-
rev: v0.0.205
52+
rev: v0.0.212
5253
hooks:
5354
- id: ruff
5455
- repo: https://github.com/dosisod/refurb

0 commit comments

Comments
 (0)