From a7bedd5f09f3ca67d8b130bfc8197b3136f74148 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:02:16 +0100 Subject: [PATCH 1/5] pre-commit autoupdate --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9397bcf..113121b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,26 +1,26 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: check-yaml - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.1 + rev: v0.9.7 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 + rev: v1.8.0 hooks: - id: pyproject-fmt exclude: docs/examples/ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.9.0 + rev: v1.15.0 hooks: - id: mypy args: [--strict] @@ -34,6 +34,6 @@ repos: - rich - repo: https://github.com/scientific-python/cookie - rev: 2024.04.23 + rev: 2025.01.22 hooks: - id: sp-repo-review From 09e8aa0115d1b38d091c26b18a8b98b3b6e8bb58 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 22 Feb 2025 20:49:24 +0100 Subject: [PATCH 2/5] Fix mypy [unused-ignore] error Unused "type: ignore" comment --- src/setuptools_scm/_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setuptools_scm/_log.py b/src/setuptools_scm/_log.py index 7e4b7db7..edab1e79 100644 --- a/src/setuptools_scm/_log.py +++ b/src/setuptools_scm/_log.py @@ -21,7 +21,7 @@ class AlwaysStdErrHandler(logging.StreamHandler): # type: ignore[type-arg] def __init___(self) -> None: super().__init__(sys.stderr) - @property # type: ignore [override] + @property def stream(self) -> IO[str]: return sys.stderr From 5ed40fd7485fb7526bd699d59dc0a3782849d953 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 22 Feb 2025 20:58:10 +0100 Subject: [PATCH 3/5] Apply sp-repo-review rule RF003 src directory doesn't need to be specified anymore (0.6+) --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index acb04a3b..2ab35e75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,6 @@ version = { attr = "_own_version_helper.version"} [tool.setuptools_scm] [tool.ruff] -src = ["src"] lint.select = ["E", "F", "B", "UP", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"] lint.ignore = ["B028"] lint.preview = true From fcbd08dbb8cc94c606d9305ada12bd77a439dc58 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 22 Feb 2025 21:07:01 +0100 Subject: [PATCH 4/5] Python 3.13 --- nextgen/vcs-versioning/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextgen/vcs-versioning/pyproject.toml b/nextgen/vcs-versioning/pyproject.toml index f71b85a5..6d1d2368 100644 --- a/nextgen/vcs-versioning/pyproject.toml +++ b/nextgen/vcs-versioning/pyproject.toml @@ -48,7 +48,7 @@ cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=vcs_ve no-cov = "cov --no-cov {args}" [[tool.hatch.envs.test.matrix]] -python = ["38", "39", "310", "311"] +python = [ "38", "39", "310", "311", "312", "313" ] [tool.coverage.run] branch = true From c5d444ed290819cfdcf9ffca1556b320478cb686 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:19:24 +0100 Subject: [PATCH 5/5] Ignore ruff/flake8-pytest-style rule PT030 PT030 `pytest.warns(UserWarning)` is too broad, set the `match` parameter or use a more specific warning --- testing/test_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_version.py b/testing/test_version.py index edbb9dae..32a65c0d 100644 --- a/testing/test_version.py +++ b/testing/test_version.py @@ -213,7 +213,7 @@ def test_only_version(version: str) -> None: def test_tag_regex1(tag: str, expected: str) -> None: if "+" in tag: # pytest bug wrt cardinality - with pytest.warns(UserWarning): + with pytest.warns(UserWarning): # noqa: PT030 result = meta(tag, config=c) else: result = meta(tag, config=c)