Skip to content

Commit fea6cc7

Browse files
committed
Rename internal geometry type unions
1 parent 0688823 commit fea6cc7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

buildconfig/stubs/pygame/geometry.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ class _HasCircleAttribute(Protocol):
1515
# An object that has a circle attribute that is either a circle, or a function
1616
# that returns a circle
1717
@property
18-
def circle(self) -> Union[_CircleValue, Callable[[], _CircleValue]]: ...
18+
def circle(self) -> Union[_CircleLike, Callable[[], _CircleLike]]: ...
1919

20-
_CircleValue = Union[
20+
_CircleLike = Union[
2121
Circle, Tuple[Point, float], SequenceLike[float], _HasCircleAttribute
2222
]
2323

2424
class _HasLineAttribute(Protocol):
2525
# An object that has a line attribute that is either a line, or a function
2626
# that returns a line
2727
@property
28-
def line(self) -> Union[_LineValue, Callable[[], _LineValue]]: ...
28+
def line(self) -> Union[_LineLike, Callable[[], _LineLike]]: ...
2929

30-
_LineValue = Union[Line, SequenceLike[float], SequenceLike[Point], _HasLineAttribute]
30+
_LineLike = Union[Line, SequenceLike[float], SequenceLike[Point], _HasLineAttribute]
3131

3232
_CanBeCollided = Union[Circle, Rect, FRect, Point]
3333
_CanBeIntersected = Union[Circle]
@@ -94,7 +94,7 @@ class Circle:
9494
@overload
9595
def __init__(self, pos: Point, r: float) -> None: ...
9696
@overload
97-
def __init__(self, circle: _CircleValue) -> None: ...
97+
def __init__(self, circle: _CircleLike) -> None: ...
9898
@overload
9999
def move(self, x: float, y: float, /) -> Circle: ...
100100
@overload
@@ -108,7 +108,7 @@ class Circle:
108108
@overload
109109
def collidepoint(self, point: Point, /) -> bool: ...
110110
@overload
111-
def collidecircle(self, circle: _CircleValue, /) -> bool: ...
111+
def collidecircle(self, circle: _CircleLike, /) -> bool: ...
112112
@overload
113113
def collidecircle(self, x: float, y: float, r: float, /) -> bool: ...
114114
@overload
@@ -125,7 +125,7 @@ class Circle:
125125
def intersect(self, other: _CanBeIntersected, /) -> List[Tuple[float, float]]: ...
126126
def contains(self, shape: _CanBeCollided, /) -> bool: ...
127127
@overload
128-
def update(self, circle: _CircleValue, /) -> None: ...
128+
def update(self, circle: _CircleLike, /) -> None: ...
129129
@overload
130130
def update(self, x: float, y: float, r: float, /) -> None: ...
131131
@overload
@@ -173,6 +173,6 @@ class Line:
173173
@overload
174174
def __init__(self, a: Point, b: Point) -> None: ...
175175
@overload
176-
def __init__(self, line: _LineValue) -> None: ...
176+
def __init__(self, line: _LineLike) -> None: ...
177177
def __copy__(self) -> Line: ...
178178
def copy(self) -> Line: ...

0 commit comments

Comments
 (0)