mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-10 09:16:17 +03:00
17 lines
372 B
Python
17 lines
372 B
Python
|
import sys
|
||
|
|
||
|
if sys.version_info >= (3, 10):
|
||
|
from typing import TypeGuard
|
||
|
else:
|
||
|
try:
|
||
|
from typing_extensions import TypeGuard
|
||
|
except ImportError:
|
||
|
from typing import Any, Type
|
||
|
|
||
|
class TypeGuard: # type: ignore[no-redef]
|
||
|
def __class_getitem__(cls, item: Any) -> Type[bool]:
|
||
|
return bool
|
||
|
|
||
|
|
||
|
__all__ = ["TypeGuard"]
|