Skip to content

Commit 272c63b

Browse files
committed
ruff: Fix B009 Do not call getattr with a constant attribute value.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 7aeb8f2 commit 272c63b

File tree

1 file changed

+1
-1
lines changed
  • zulip_bots/zulip_bots/bots/witai

1 file changed

+1
-1
lines changed

zulip_bots/zulip_bots/bots/witai/witai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_handle(location: str) -> Optional[Callable[[Dict[str, Any]], Optional[st
8787
if not isinstance(loader, importlib.abc.Loader):
8888
return None
8989
loader.exec_module(handler)
90-
return getattr(handler, "handle")
90+
return handler.handle
9191
except Exception as e:
9292
print(e)
9393
return None

0 commit comments

Comments
 (0)