Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt authored Nov 25, 2021
1 parent eedaf6e commit 87acd92
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arclet/letoderea/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@ def argument_analysis(callable_target: Callable):
@lru_cache(4096)
def iscoroutinefunction(o):
return inspect.iscoroutinefunction(o)


def event_class_generator(target=TemplateEvent):
for i in target.__subclasses__():
yield i
if i.__subclasses__():
yield from event_class_generator(i)


def search_event(name: str):
for i in event_class_generator():
if i.__name__ == name:
return i

0 comments on commit 87acd92

Please sign in to comment.