INNER CODE UNIT · Python
__getattr__
spyoungtech/ahk · ahk/_async/engine.py:167
def __getattr__(self, name: str) -> Callable[..., Any]:
is_async = False
is_async = True # unasync: remove
if is_async:
if name in self._method_registry.async_methods:
method = self._method_registry.async_methods[name]
return partial(method, self)
else:
if name in self._method_registry.sync_methods:
method = self._method_registry.sync_methods[name]
return partial(method, self)
raise AttributeError(f'{self.__class__.__name__!r} object has no attribute {name!r}')
def _get_window_extension_method(self, name: str) -> Callable[..., Any] | None:
is_async = False
is_async = True # unasync: remove
if is_async: