diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de9c3fda..f8a40cd9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,7 @@ repos: rev: v0.7.2 hooks: - id: ruff + args: ["--fix", "--show-fixes"] - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 diff --git a/compliance_checker/__init__.py b/compliance_checker/__init__.py index f5975758..ca60116c 100644 --- a/compliance_checker/__init__.py +++ b/compliance_checker/__init__.py @@ -1,6 +1,7 @@ +from collections.abc import Generator from contextlib import contextmanager from tempfile import NamedTemporaryFile -from typing import BinaryIO, Generator +from typing import BinaryIO try: from ._version import __version__ diff --git a/compliance_checker/base.py b/compliance_checker/base.py index 0f276754..f7189be5 100644 --- a/compliance_checker/base.py +++ b/compliance_checker/base.py @@ -24,7 +24,7 @@ # Python 3.5+ should work, also have a fallback try: - from typing import Pattern + from re import Pattern re_pattern_type = Pattern except ImportError: diff --git a/pyproject.toml b/pyproject.toml index 17e8b215..696cf98f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ write_to_template = "__version__ = '{version}'" tag_regex = "^(?Pv)?(?P[^\\+]+)(?P.*)?$" [tool.ruff] -target-version = "py38" +target-version = "py39" line-length = 200 exclude = [