ci: pre-commit autoupdate [pre-commit.ci] (#207)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot]
2023-08-14 19:20:05 -04:00
committed by GitHub
parent f6317d8003
commit 2d33100d72
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ ci:
exclude: '.*\.(css|js|svg)$'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.282'
rev: 'v0.0.284'
hooks:
- id: ruff
verbose: true
@@ -40,7 +40,7 @@ repos:
exclude: ^(docs|tools|tests)
args: [--config=pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.0
hooks:
- id: mypy
verbose: true

View File

@@ -21,7 +21,7 @@ class VersionInfo:
if not isinstance(cmp, tuple): raise NotImplementedError
if not (1 <= len(cmp) <= 4): raise NotImplementedError
return t.cast(t.Tuple[int, int, int, str], attr.astuple(self)[:len(cmp)]), t.cast(t.Tuple[int, int, int, str], cmp)
def __eq__(self, other: t.Any) -> bool:
def __eq__(self, other: object) -> bool:
try: us, them = self._ensure_tuple(other)
except NotImplementedError: return NotImplemented
return us == them