Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/PIL/_typing.py: 65%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import annotations
3import os
4import sys
5from collections.abc import Sequence
6from typing import Any, Protocol, TypeVar
8TYPE_CHECKING = False
9if TYPE_CHECKING:
10 from numbers import _IntegralLike as IntegralLike
12 try:
13 import numpy.typing as npt
15 NumpyArray = npt.NDArray[Any]
16 except ImportError:
17 pass
19if sys.version_info >= (3, 13):
20 from types import CapsuleType
21else:
22 CapsuleType = object
24if sys.version_info >= (3, 12):
25 from collections.abc import Buffer
26else:
27 Buffer = Any
30Coords = Sequence[float] | Sequence[Sequence[float]]
33_T_co = TypeVar("_T_co", covariant=True)
36class SupportsRead(Protocol[_T_co]):
37 def read(self, length: int = ..., /) -> _T_co: ...
40StrOrBytesPath = str | bytes | os.PathLike[str] | os.PathLike[bytes]
43__all__ = ["Buffer", "IntegralLike", "StrOrBytesPath", "SupportsRead"]