header fixes, and lazy queries

This commit is contained in:
Will McGugan
2022-08-13 09:12:59 +01:00
parent 71bb29d5d4
commit f00e2d22d4
18 changed files with 398 additions and 157 deletions

View File

@@ -342,10 +342,13 @@ class MessagePump(metaclass=MessagePumpMeta):
message (Message): Message object.
"""
private_method = f"_{method_name}"
for cls in self.__class__.__mro__:
if message._no_default_action:
break
method = cls.__dict__.get(method_name, None)
method = cls.__dict__.get(private_method, None) or cls.__dict__.get(
method_name, None
)
if method is not None:
yield cls, method.__get__(self, cls)