Skip to content

Commit dfc8252

Browse files
committed
Moving Event() to python - bugfix 5.
1 parent 771e13c commit dfc8252

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src_py/event.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from pygame._event import * # pylint: disable=wildcard-import; lgtm[py/polluting-import]
3+
from pygame._event import * # pylint: disable=wildcard-import,unused-wildcard-import; lgtm[py/polluting-import]
44
from pygame._event import _internal_mod_init as _init, _internal_mod_quit as _quit
55
from pygame.constants import USEREVENT, NUMEVENTS
66
from pygame.base import error
@@ -156,8 +156,9 @@ def __getattribute__(self, name):
156156

157157
def __setattr__(self, name, value):
158158
if name in ("_type", "_dict", "type", "dict"):
159-
return super().__setattr__(name, value)
160-
self._dict[name] = value
159+
super().__setattr__(name, value)
160+
else:
161+
self._dict[name] = value
161162

162163

163164
EventType = Event

0 commit comments

Comments
 (0)