[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-12-27 13:57:20 +00:00
parent 3a4298d16c
commit 0d90bc8187
3 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import sys
if sys.version_info >= (3, 10):
@ -6,10 +8,10 @@ else:
try:
from typing_extensions import TypeGuard
except ImportError:
from typing import Any, Type
from typing import Any
class TypeGuard: # type: ignore[no-redef]
def __class_getitem__(cls, item: Any) -> Type[bool]:
def __class_getitem__(cls, item: Any) -> type[bool]:
return bool

View File

@ -3,6 +3,7 @@ from __future__ import annotations
import os
from pathlib import Path
from typing import Any, NoReturn
from ._typing import TypeGuard

View File

@ -35,7 +35,7 @@ skip_install = true
deps =
mypy==1.7.1
numpy
commands =
mypy src {posargs}
extras =
typing
commands =
mypy src {posargs}