init
This commit is contained in:
commit
38355d2442
9083 changed files with 1225834 additions and 0 deletions
34
.venv/lib/python3.8/site-packages/pygame/_common.pyi
Normal file
34
.venv/lib/python3.8/site-packages/pygame/_common.pyi
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
from os import PathLike
|
||||
from typing import IO, List, Sequence, Tuple, Union
|
||||
|
||||
from typing_extensions import Protocol
|
||||
|
||||
from pygame.color import Color
|
||||
from pygame.math import Vector2
|
||||
from pygame.rect import Rect
|
||||
|
||||
# For functions that take a file name
|
||||
_AnyPath = Union[str, bytes, PathLike[str], PathLike[bytes]]
|
||||
|
||||
# Most pygame functions that take a file argument should be able to handle
|
||||
# a _FileArg type
|
||||
_FileArg = Union[_AnyPath, IO[bytes], IO[str]]
|
||||
|
||||
_Coordinate = Union[Tuple[float, float], Sequence[float], Vector2]
|
||||
|
||||
# This typehint is used when a function would return an RGBA tuble
|
||||
_RgbaOutput = Tuple[int, int, int, int]
|
||||
_ColorValue = Union[Color, int, str, Tuple[int, int, int], List[int], _RgbaOutput]
|
||||
|
||||
_CanBeRect = Union[
|
||||
Rect,
|
||||
Tuple[int, int, int, int],
|
||||
List[int],
|
||||
Tuple[_Coordinate, _Coordinate],
|
||||
List[_Coordinate],
|
||||
]
|
||||
|
||||
class _HasRectAttribute(Protocol):
|
||||
rect: _CanBeRect
|
||||
|
||||
_RectValue = Union[_CanBeRect, _HasRectAttribute]
|
||||
Loading…
Add table
Add a link
Reference in a new issue