diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f6ef9ff..a3598ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: additional_dependencies: [black==23.*] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.2.2" + rev: "v0.3.2" hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -44,7 +44,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy files: (src|web|tests) diff --git a/src/repo_review/__init__.py b/src/repo_review/__init__.py index da179cc..c0b55a5 100644 --- a/src/repo_review/__init__.py +++ b/src/repo_review/__init__.py @@ -4,7 +4,6 @@ Review repos with a set of checks defined by plugins. """ - from __future__ import annotations from ._version import version as __version__ diff --git a/src/repo_review/ghpath.py b/src/repo_review/ghpath.py index 583a9a4..ef9c9db 100644 --- a/src/repo_review/ghpath.py +++ b/src/repo_review/ghpath.py @@ -76,12 +76,10 @@ def name(self) -> str: return (self.path or self.repo).split("/")[-1] @typing.overload # type: ignore[override] - def open(self, mode: Literal["r"], encoding: str | None = ...) -> io.StringIO: - ... + def open(self, mode: Literal["r"], encoding: str | None = ...) -> io.StringIO: ... @typing.overload - def open(self, mode: Literal["rb"]) -> io.BytesIO: - ... + def open(self, mode: Literal["rb"]) -> io.BytesIO: ... def open( self, mode: Literal["r", "rb"] = "r", encoding: str | None = "utf-8" @@ -164,12 +162,10 @@ def name(self) -> str: return self._fake_name @typing.overload # type: ignore[override] - def open(self, mode: Literal["r"], encoding: str | None = ...) -> io.StringIO: - ... + def open(self, mode: Literal["r"], encoding: str | None = ...) -> io.StringIO: ... @typing.overload - def open(self, mode: Literal["rb"]) -> io.BytesIO: - ... + def open(self, mode: Literal["rb"]) -> io.BytesIO: ... def open( self, mode: Literal["r", "rb"] = "r", encoding: str | None = "utf-8" diff --git a/src/repo_review/processor.py b/src/repo_review/processor.py index af63300..9670cfc 100644 --- a/src/repo_review/processor.py +++ b/src/repo_review/processor.py @@ -108,8 +108,7 @@ class HasFamily(typing.Protocol): """ @property - def family(self) -> str: - ... + def family(self) -> str: ... T = TypeVar("T", bound=HasFamily)