Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/PIL/_typing.py: 0%
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
3__lazy_modules__ = {"numbers", "types"}
5import os
6import sys
7from collections.abc import Sequence
8from numbers import _IntegralLike as IntegralLike
9from typing import Any, Protocol, TypeVar
11TYPE_CHECKING = False
12if TYPE_CHECKING:
13 try:
14 import numpy.typing as npt
16 NumpyArray = npt.NDArray[Any]
17 except ImportError:
18 pass
20if sys.version_info >= (3, 13):
21 from types import CapsuleType
22else:
23 CapsuleType = object
25if sys.version_info >= (3, 12):
26 from collections.abc import Buffer
27else:
28 Buffer = Any
31_Ink = float | tuple[int, ...] | str
33Coords = Sequence[float] | Sequence[Sequence[float]]
36_T_co = TypeVar("_T_co", covariant=True)
39class SupportsRead(Protocol[_T_co]):
40 def read(self, length: int = ..., /) -> _T_co: ...
43StrOrBytesPath = str | bytes | os.PathLike[str] | os.PathLike[bytes]
46__all__ = ["Buffer", "IntegralLike", "StrOrBytesPath", "SupportsRead"]