mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
3a4298d16c
commit
0d90bc8187
|
@ -1,3 +1,5 @@
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info >= (3, 10):
|
if sys.version_info >= (3, 10):
|
||||||
|
@ -6,10 +8,10 @@ else:
|
||||||
try:
|
try:
|
||||||
from typing_extensions import TypeGuard
|
from typing_extensions import TypeGuard
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from typing import Any, Type
|
from typing import Any
|
||||||
|
|
||||||
class TypeGuard: # type: ignore[no-redef]
|
class TypeGuard: # type: ignore[no-redef]
|
||||||
def __class_getitem__(cls, item: Any) -> Type[bool]:
|
def __class_getitem__(cls, item: Any) -> type[bool]:
|
||||||
return bool
|
return bool
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, NoReturn
|
from typing import Any, NoReturn
|
||||||
|
|
||||||
from ._typing import TypeGuard
|
from ._typing import TypeGuard
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user