From 472c4442a3ce483053c0c02a54c88a965b953195 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 23:49:04 -0400 Subject: [PATCH] chore(deps): update pre-commit hooks (#186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update pre-commit hooks 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/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.8) - [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) * style: pre-commit fixes * Update .pre-commit-config.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner --- .pre-commit-config.yaml | 4 ++-- src/repo_review/__init__.py | 1 - src/repo_review/ghpath.py | 12 ++++-------- src/repo_review/processor.py | 3 +-- 4 files changed, 7 insertions(+), 13 deletions(-) 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)