From e16379d2fc13bb2ca4485f470551845f3992d3f9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 17:43:30 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#29) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0) - [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.0.0) - [github.com/pre-commit/mirrors-mypy: v0.982 → v0.991](https://github.com/pre-commit/mirrors-mypy/compare/v0.982...v0.991) * fix * fix Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hans Dembinski Co-authored-by: Hans Dembinski --- .pre-commit-config.yaml | 6 +++--- pyproject.toml | 1 + src/jacobi/_typing.py | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1c023a..c2749c2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-case-conflict - id: check-docstring-first @@ -32,7 +32,7 @@ repos: # Python linter (Flake8) - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 @@ -44,7 +44,7 @@ repos: # Python type checking - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v0.982' + rev: 'v0.991' hooks: - id: mypy args: [src] diff --git a/pyproject.toml b/pyproject.toml index c12514f..bf92d45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,3 +11,4 @@ write_to = "src/jacobi/_version.py" [tool.mypy] ignore_missing_imports = true allow_redefinition = true +no_implicit_optional = false diff --git a/src/jacobi/_typing.py b/src/jacobi/_typing.py index 2d3c54b..4beba56 100644 --- a/src/jacobi/_typing.py +++ b/src/jacobi/_typing.py @@ -1,11 +1,13 @@ -from typing import Iterable, Sized, Generic, TypeVar +from typing import Sized, Generic, TypeVar +import abc T = TypeVar("T") -class Indexable(Iterable, Sized, Generic[T]): +class Indexable(Sized, Generic[T]): """Indexable type for mypy.""" + @abc.abstractmethod def __getitem__(self, idx: int) -> T: """Get item at index idx.""" ... # pragma: no cover