This commit is contained in:
2025-05-22 20:25:38 +02:00
parent 09f6750c2b
commit ce03fbf12f
529 changed files with 3353 additions and 3312 deletions

View File

@@ -301,7 +301,7 @@ class _HasEventsDispatch(Generic[_ET]):
"Type[_Dispatch[_ET]]",
type(
"%sDispatch" % classname,
(dispatch_base,), # type: ignore
(dispatch_base,),
{"__slots__": event_names},
),
)
@@ -323,7 +323,7 @@ class _HasEventsDispatch(Generic[_ET]):
assert dispatch_target_cls is not None
if (
hasattr(dispatch_target_cls, "__slots__")
and "_slots_dispatch" in dispatch_target_cls.__slots__ # type: ignore # noqa: E501
and "_slots_dispatch" in dispatch_target_cls.__slots__
):
dispatch_target_cls.dispatch = slots_dispatcher(cls)
else:

View File

@@ -241,7 +241,7 @@ class _EventKey(Generic[_ET]):
):
self.target = target
self.identifier = identifier
self.fn = fn # type: ignore[assignment]
self.fn = fn
if isinstance(fn, types.MethodType):
self.fn_key = id(fn.__func__), id(fn.__self__)
else: