Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#29)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](pre-commit/pre-commit-hooks@v4.3.0...v4.4.0)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](PyCQA/flake8@5.0.4...6.0.0)
- [github.com/pre-commit/mirrors-mypy: v0.982 → v0.991](pre-commit/mirrors-mypy@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 <[email protected]>
Co-authored-by: Hans Dembinski <[email protected]>
  • Loading branch information
3 people authored Dec 8, 2022
1 parent b889822 commit e16379d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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]
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ write_to = "src/jacobi/_version.py"
[tool.mypy]
ignore_missing_imports = true
allow_redefinition = true
no_implicit_optional = false
6 changes: 4 additions & 2 deletions src/jacobi/_typing.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e16379d

Please sign in to comment.