Skip to content

Commit 293078c

Browse files
committed
Fix geometry has-attribute protocols
1 parent 7f18a37 commit 293078c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

buildconfig/stubs/pygame/geometry.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ _CanBeLine = Union[
1919
SequenceLike[Point],
2020
]
2121

22-
class _HasCirclettribute(Protocol):
22+
class _HasCircleAttribute(Protocol):
2323
# An object that has a circle attribute that is either a circle, or a function
2424
# that returns a circle
25-
circle: Union[_CanBeCircle, Callable[[], _CanBeCircle]]
25+
@property
26+
def circle(self) -> Union[_CanBeCircle, Callable[[], _CanBeCircle]]: ...
2627

27-
_CircleValue = Union[_CanBeCircle, _HasCirclettribute]
28+
_CircleValue = Union[_CanBeCircle, _HasCircleAttribute]
2829

2930
class _HasLineAttribute(Protocol):
3031
# An object that has a line attribute that is either a line, or a function
3132
# that returns a line
32-
line: Union[_CanBeLine, Callable[[], _CanBeLine]]
33+
@property
34+
def line(self) -> Union[_CanBeLine, Callable[[], _CanBeLine]]: ...
3335

3436

3537
_LineValue = Union[_CanBeLine, _HasLineAttribute]

0 commit comments

Comments
 (0)