diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4b73327..9be91a15 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,7 +56,7 @@ repos: files: ^\.pre\-commit\-(config|hooks)\.yaml$ - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black @@ -66,12 +66,12 @@ repos: - id: blacken-docs - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v7.3.1 + rev: v7.3.2 hooks: - id: cspell - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: 2.7.2 + rev: 2.7.3 hooks: - id: editorconfig-checker name: editorconfig @@ -97,7 +97,7 @@ repos: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.330 + rev: v1.1.334 hooks: - id: pyright @@ -109,7 +109,7 @@ repos: - --py36-plus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.292 + rev: v0.1.4 hooks: - id: ruff args: diff --git a/src/repoma/check_dev_files/citation.py b/src/repoma/check_dev_files/citation.py index b741209a..ec93b7c9 100644 --- a/src/repoma/check_dev_files/citation.py +++ b/src/repoma/check_dev_files/citation.py @@ -1,4 +1,5 @@ """Check citation files.""" + import json import os from textwrap import dedent diff --git a/src/repoma/check_dev_files/commitlint.py b/src/repoma/check_dev_files/commitlint.py index 7f19c138..78032884 100644 --- a/src/repoma/check_dev_files/commitlint.py +++ b/src/repoma/check_dev_files/commitlint.py @@ -2,6 +2,7 @@ See https://github.com/ComPWA/repo-maintenance/issues/177. """ + import os from repoma.errors import PrecommitError diff --git a/src/repoma/check_dev_files/github_workflows.py b/src/repoma/check_dev_files/github_workflows.py index aab629e1..9e30a330 100644 --- a/src/repoma/check_dev_files/github_workflows.py +++ b/src/repoma/check_dev_files/github_workflows.py @@ -1,4 +1,5 @@ """Check :file:`.github/workflows` folder content.""" + import os import re import shutil diff --git a/src/repoma/check_dev_files/mypy.py b/src/repoma/check_dev_files/mypy.py index ba2dbd84..71e813cb 100644 --- a/src/repoma/check_dev_files/mypy.py +++ b/src/repoma/check_dev_files/mypy.py @@ -1,4 +1,5 @@ """Check and update :code:`mypy` settings.""" + import os import tomlkit diff --git a/src/repoma/check_dev_files/nbstripout.py b/src/repoma/check_dev_files/nbstripout.py index 145c06c2..1dbdac52 100644 --- a/src/repoma/check_dev_files/nbstripout.py +++ b/src/repoma/check_dev_files/nbstripout.py @@ -1,6 +1,5 @@ """Check the nbstripout hook in the pre-commit config.""" - from ruamel.yaml.comments import CommentedMap from ruamel.yaml.scalarstring import LiteralScalarString diff --git a/src/repoma/check_dev_files/precommit.py b/src/repoma/check_dev_files/precommit.py index 5917fdd1..a7337e76 100644 --- a/src/repoma/check_dev_files/precommit.py +++ b/src/repoma/check_dev_files/precommit.py @@ -1,4 +1,5 @@ """Check content of :code:`.pre-commit-config.yaml` and related files.""" + from textwrap import dedent from typing import List, Set diff --git a/src/repoma/check_dev_files/pyright.py b/src/repoma/check_dev_files/pyright.py index 6262d99b..fbb840ea 100644 --- a/src/repoma/check_dev_files/pyright.py +++ b/src/repoma/check_dev_files/pyright.py @@ -1,4 +1,5 @@ """Check and update :code:`mypy` settings.""" + import json import os from typing import TYPE_CHECKING, Optional diff --git a/src/repoma/check_dev_files/pytest.py b/src/repoma/check_dev_files/pytest.py index 479e282c..cca6fa5d 100644 --- a/src/repoma/check_dev_files/pytest.py +++ b/src/repoma/check_dev_files/pytest.py @@ -1,4 +1,5 @@ """Check and update :code:`pytest` settings.""" + import os from typing import Dict diff --git a/src/repoma/check_dev_files/release_drafter.py b/src/repoma/check_dev_files/release_drafter.py index 9a4fbc2f..4e97a490 100644 --- a/src/repoma/check_dev_files/release_drafter.py +++ b/src/repoma/check_dev_files/release_drafter.py @@ -1,4 +1,5 @@ """Update Release Drafter Action.""" + import os from typing import Any, Dict diff --git a/src/repoma/check_dev_files/setup_cfg.py b/src/repoma/check_dev_files/setup_cfg.py index 772eb46b..9587654d 100644 --- a/src/repoma/check_dev_files/setup_cfg.py +++ b/src/repoma/check_dev_files/setup_cfg.py @@ -1,4 +1,5 @@ """Apply a certain set of standards to the :file:`setup.cfg`.""" + # pyright: reportUnknownLambdaType=false import dataclasses import os diff --git a/src/repoma/check_dev_files/toml.py b/src/repoma/check_dev_files/toml.py index 3e75d965..44ef193f 100644 --- a/src/repoma/check_dev_files/toml.py +++ b/src/repoma/check_dev_files/toml.py @@ -1,4 +1,5 @@ """Configuration for working with TOML files.""" + import os import shutil from glob import glob diff --git a/src/repoma/errors.py b/src/repoma/errors.py index 82836d51..47fd55a4 100644 --- a/src/repoma/errors.py +++ b/src/repoma/errors.py @@ -1,5 +1,4 @@ """Exceptions that are caught by a pre-commit hook and printed instead.""" - class PrecommitError(RuntimeError): pass diff --git a/src/repoma/self_check.py b/src/repoma/self_check.py index 51de7f9d..ebc85126 100644 --- a/src/repoma/self_check.py +++ b/src/repoma/self_check.py @@ -1,4 +1,5 @@ """Checks to be performed locally on the ComPWA/repo-maintenance repository.""" + from functools import lru_cache from io import StringIO from textwrap import dedent, indent diff --git a/src/repoma/utilities/pyproject.py b/src/repoma/utilities/pyproject.py index c7b7b32f..488272b1 100644 --- a/src/repoma/utilities/pyproject.py +++ b/src/repoma/utilities/pyproject.py @@ -1,4 +1,5 @@ """Tools for loading, inspecting, and updating :code:`pyproject.toml`.""" + import os from typing import Any, Iterable, Optional