Skip to content

Commit f095550

Browse files
committed
Apparently I was using the wrong ignore code
1 parent 793a5ee commit f095550

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

buildconfig/stubs/pygame/sprite.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ _TDirtySprite = TypeVar("_TDirtySprite", bound=_DirtySpriteSupportsGroup)
150150
class AbstractGroup(Generic[_TSprite]):
151151
spritedict: Dict[_TSprite, Optional[Union[FRect, Rect]]]
152152
lostsprites: List[Union[FRect, Rect]]
153-
def __class_getitem__(cls, generic: Any) -> typing._GenericAlias: ... # type: ignore[attr-defined]
153+
def __class_getitem__(cls, generic: Any) -> typing._GenericAlias: ... # type: ignore[name-defined]
154154
def __init__(self) -> None: ...
155155
def __len__(self) -> int: ...
156156
def __iter__(self) -> Iterator[_TSprite]: ...

src_py/sprite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def __class_getitem__(cls, generic):
375375
# switch to `types.GenericAlias` once Python 3.8 support is dropped
376376
import typing
377377

378-
return typing._GenericAlias(cls, generic) # type: ignore[attr-defined]
378+
return typing._GenericAlias(cls, generic) # type: ignore[name-defined]
379379

380380
# protected identifier value to identify sprite groups, and avoid infinite recursion
381381
_spritegroup = True

test/sprite_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def test_type_subscript(self):
669669
# switch to `types.GenericAlias` once Python 3.8 support is dropped
670670
import typing
671671

672-
self.assertIsInstance(group_generic_alias, typing._GenericAlias) # type: ignore[attr-defined]
672+
self.assertIsInstance(group_generic_alias, typing._GenericAlias) # type: ignore[name-defined]
673673
self.assertIs(typing.get_origin(group_generic_alias), sprite.Group)
674674
self.assertEqual(typing.get_args(group_generic_alias), (sprite.Sprite,))
675675

0 commit comments

Comments
 (0)