From 3ead2c2344734302ecc6b2c15f6799f74a509b5e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 19:45:03 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - https://github.com/asottile/reorder_python_imports → https://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.9.0 → v3.14.0](https://github.com/asottile/reorder-python-imports/compare/v3.9.0...v3.14.0) - [github.com/asottile/setup-cfg-fmt: v2.2.0 → v2.7.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.2.0...v2.7.0) - [github.com/psf/black: 23.1.0 → 25.1.0](https://github.com/psf/black/compare/23.1.0...25.1.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.241 → v0.9.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.241...v0.9.6) - [github.com/dosisod/refurb: v1.10.0 → v2.0.0](https://github.com/dosisod/refurb/compare/v1.10.0...v2.0.0) - [github.com/econchick/interrogate: 1.5.0 → 1.7.0](https://github.com/econchick/interrogate/compare/1.5.0...1.7.0) - [github.com/executablebooks/mdformat: 0.7.16 → 0.7.22](https://github.com/executablebooks/mdformat/compare/0.7.16...0.7.22) - [github.com/executablebooks/mdformat: 0.7.16 → 0.7.22](https://github.com/executablebooks/mdformat/compare/0.7.16...0.7.22) - [github.com/codespell-project/codespell: v2.2.2 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.4.1) - [github.com/pre-commit/mirrors-mypy: v0.991 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v0.991...v1.15.0) --- .pre-commit-config.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 105f30f..5514cf7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: | repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files args: ['--maxkb=25'] @@ -34,13 +34,13 @@ repos: - id: python-no-log-warn - id: python-use-type-annotations - id: text-unicode-replacement-char -- repo: https://github.com/asottile/reorder_python_imports - rev: v3.9.0 +- repo: https://github.com/asottile/reorder-python-imports + rev: v3.14.0 hooks: - id: reorder-python-imports args: [--py37-plus, --add-import, 'from __future__ import annotations'] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.2.0 + rev: v2.7.0 hooks: - id: setup-cfg-fmt exclude: | @@ -48,28 +48,28 @@ repos: {{cookiecutter.package_name}}/setup.cfg )$ - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 25.1.0 hooks: - id: black -- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.241 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.6 hooks: - id: ruff args: [hooks, tests] pass_filenames: false - repo: https://github.com/dosisod/refurb - rev: v1.10.0 + rev: v2.0.0 hooks: - id: refurb args: [--ignore, FURB126] exclude: ({{cookiecutter.package_name}}) - repo: https://github.com/econchick/interrogate - rev: 1.5.0 + rev: 1.7.0 hooks: - id: interrogate args: [-v, --fail-under=40] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.16 + rev: 0.7.22 hooks: - id: mdformat additional_dependencies: [ @@ -83,7 +83,7 @@ repos: {{cookiecutter.package_name}}/README.md )$ - repo: https://github.com/executablebooks/mdformat - rev: 0.7.16 + rev: 0.7.22 hooks: - id: mdformat additional_dependencies: [ @@ -98,12 +98,12 @@ repos: # path/to/file.py # )$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.4.1 hooks: - id: codespell additional_dependencies: [tomli] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v0.991' + rev: 'v1.15.0' hooks: - id: mypy args: [ From 309f2a3a6b181b6bba97c75f4a1127142d7049cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 19:45:28 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/conf.py | 1 + hooks/post_gen_project.py | 1 + hooks/pre_gen_project.py | 1 + setup.cfg | 4 ++-- tests/__init__.py | 1 + tests/test_cookie.py | 12 ++++++------ .../src/{{cookiecutter.__package_name}}/__init__.py | 1 + 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f8958ad..9f1d964 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,6 +4,7 @@ documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ + # -- Project information ----------------------------------------------------- from __future__ import annotations diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index efe9511..3294337 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -1,4 +1,5 @@ """This module contains hooks which are executed after the template is rendered.""" + from __future__ import annotations import shutil diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index d6ffcb8..aea9f31 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -1,4 +1,5 @@ """This module contains hooks which are executed before the template is rendered.""" + from __future__ import annotations import re diff --git a/setup.cfg b/setup.cfg index 5616eeb..a00387d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ url = https://cookiecutter-pytask-plugin.readthedocs.io/en/latest author = Tobias Raabe author_email = raabe@posteo.de license = MIT -license_file = LICENSE +license_files = LICENSE platforms = unix, linux, osx, cygwin, win32 classifiers = Development Status :: 3 - Alpha @@ -26,5 +26,5 @@ project_urls = Tracker = https://github.com/pytask-dev/cookiecutter-pytask-plugin/issues [options] -python_requires = >=3.7 +python_requires = >=3.9 zip_safe = False diff --git a/tests/__init__.py b/tests/__init__.py index 83a9d18..71bd238 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,3 @@ """This file is necessary to apply custom mypy configurations for the tests.""" + from __future__ import annotations diff --git a/tests/test_cookie.py b/tests/test_cookie.py index b4cbf4e..b375b9b 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}}/src/{{cookiecutter.__package_name}}/__init__.py b/{{cookiecutter.package_name}}/src/{{cookiecutter.__package_name}}/__init__.py index 5769aa6..483c821 100644 --- a/{{cookiecutter.package_name}}/src/{{cookiecutter.__package_name}}/__init__.py +++ b/{{cookiecutter.package_name}}/src/{{cookiecutter.__package_name}}/__init__.py @@ -1,4 +1,5 @@ """This module contains the main namespace of the package.""" + from __future__ import annotations try: