Pillow/src/PIL/_typing.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
372 B
Python
Raw Normal View History

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"]