From db2731839e8c756005fa1fb4e334e254ff721af2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:11:53 +0100 Subject: [PATCH] [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 --- .pre-commit-config.yaml | 9 ++------- tests/test_cookie.py | 12 ++++++------ .../.pre-commit-config.yaml | 9 +++++---- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a3d05b..bc28a3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,11 +34,6 @@ repos: - id: python-no-log-warn - id: python-use-type-annotations - id: text-unicode-replacement-char -- repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 - hooks: - - id: pyupgrade - args: [--py37-plus] - repo: https://github.com/asottile/reorder_python_imports rev: v3.9.0 hooks: @@ -56,13 +51,13 @@ repos: rev: 22.12.0 hooks: - id: black -- repo: https://github.com/myint/docformatter +- repo: https://github.com/PyCQA/docformatter rev: v1.5.1 hooks: - id: docformatter args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.205 + rev: v0.0.212 hooks: - id: ruff args: [hooks, tests] diff --git a/tests/test_cookie.py b/tests/test_cookie.py index b375b9b..b4cbf4e 100644 --- a/tests/test_cookie.py +++ b/tests/test_cookie.py @@ -7,7 +7,7 @@ import pytest -@pytest.mark.end_to_end +@pytest.mark.end_to_end() def test_bake_project(cookies): major, minor = sys.version_info[:2] python_version = f"{major}.{minor}" @@ -25,7 +25,7 @@ def test_bake_project(cookies): assert result.project_path.is_dir() -@pytest.mark.end_to_end +@pytest.mark.end_to_end() def test_remove_readthedocs(cookies): result = cookies.bake(extra_context={"add_readthedocs": "no"}) @@ -39,7 +39,7 @@ def test_remove_readthedocs(cookies): assert "readthedocs" not in readme -@pytest.mark.end_to_end +@pytest.mark.end_to_end() def test_remove_github_actions(cookies): result = cookies.bake(extra_context={"add_github_actions": "no"}) @@ -53,7 +53,7 @@ def test_remove_github_actions(cookies): assert "github/workflow/status" not in readme -@pytest.mark.end_to_end +@pytest.mark.end_to_end() def test_remove_tox(cookies): result = cookies.bake(extra_context={"add_tox": "no"}) @@ -67,7 +67,7 @@ def test_remove_tox(cookies): assert not tox.exists() -@pytest.mark.end_to_end +@pytest.mark.end_to_end() def test_remove_license(cookies): result = cookies.bake(extra_context={"open_source_license": "Not open source"}) @@ -79,7 +79,7 @@ def test_remove_license(cookies): assert not license_.exists() -@pytest.mark.end_to_end +@pytest.mark.end_to_end() @pytest.mark.skipif(os.environ.get("CI") is None, reason="Run only in CI.") def test_check_conda_environment_creation_and_run_all_checks(cookies): """Test that the conda environment is created and pre-commit passes.""" diff --git a/{{cookiecutter.package_name}}/.pre-commit-config.yaml b/{{cookiecutter.package_name}}/.pre-commit-config.yaml index 67933ce..de8c0db 100644 --- a/{{cookiecutter.package_name}}/.pre-commit-config.yaml +++ b/{{cookiecutter.package_name}}/.pre-commit-config.yaml @@ -24,11 +24,12 @@ repos: - id: python-no-log-warn - id: python-use-type-annotations - id: text-unicode-replacement-char -- repo: https://github.com/asottile/pyupgrade +{% if cookiecutter.python_version not in ["3.10", "3.11", "3.12"] %}- repo: https://github.com/asottile/pyupgrade rev: v3.3.1 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py{{ cookiecutter.python_version | replace('.', '') }}-plus] +{% endif %} - repo: https://github.com/asottile/reorder_python_imports rev: v3.9.0 hooks: @@ -42,13 +43,13 @@ repos: rev: 22.12.0 hooks: - id: black -- repo: https://github.com/myint/docformatter +- repo: https://github.com/PyCQA/docformatter rev: v1.5.1 hooks: - id: docformatter args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank] {% if cookiecutter.python_version in ["3.10", "3.11", "3.12"] %}- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.205 + rev: v0.0.212 hooks: - id: ruff - repo: https://github.com/dosisod/refurb