From 4d79810d3ddf174c193a9352c3b8509c75882a1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:59: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/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2) - [github.com/dosisod/refurb: v1.28.0 → v2.0.0](https://github.com/dosisod/refurb/compare/v1.28.0...v2.0.0) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc64828..b5a745e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: hooks: - id: sort-all - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.2 hooks: - id: ruff args: [--config, pyproject.toml, hooks, tests] @@ -47,7 +47,7 @@ repos: - id: ruff-format args: [--config, pyproject.toml] - repo: https://github.com/dosisod/refurb - rev: v1.28.0 + rev: v2.0.0 hooks: - id: refurb exclude: ({{cookiecutter.project_slug}}) @@ -81,7 +81,7 @@ repos: - id: codespell additional_dependencies: [tomli] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.8.0' + rev: 'v1.9.0' hooks: - id: mypy pass_filenames: false From 355a99b495c315028afd9c24b9db80f09a9d8635 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:00:32 +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 + {{cookiecutter.project_slug}}/docs/source/conf.py | 1 + .../src/{{cookiecutter.project_slug}}/__init__.py | 1 + .../src/{{cookiecutter.project_slug}}/config.py | 1 + 6 files changed, 6 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index d57a7a9..7e068da 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 """ + from importlib.metadata import version diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ba7511a..d45c3c6 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -1,4 +1,5 @@ """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 803aa36..139ff03 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -1,4 +1,5 @@ """Contains hooks which are executed before the template is rendered.""" + import re MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]*$" diff --git a/{{cookiecutter.project_slug}}/docs/source/conf.py b/{{cookiecutter.project_slug}}/docs/source/conf.py index 6f3c8dc..d9c3d2c 100644 --- a/{{cookiecutter.project_slug}}/docs/source/conf.py +++ b/{{cookiecutter.project_slug}}/docs/source/conf.py @@ -4,6 +4,7 @@ documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ + from importlib.metadata import version diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py index 6e5ee2d..f2a52c2 100644 --- a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py +++ b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py @@ -1,4 +1,5 @@ """Contains the main namespace of {{ cookiecutter.project_slug }}.""" + # Import the version from _version.py which is dynamically created by setuptools-scm # when the project is installed with ``pip install -e .``. Do not put it into version # control! diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/config.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/config.py index 20862ce..0791e1f 100644 --- a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/config.py +++ b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/config.py @@ -1,4 +1,5 @@ """Contains the general configuration of the project.""" + from pathlib import Path