ruff: Fix B009 Do not call getattr
with a constant attribute value.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
7aeb8f2619
commit
272c63bfd3
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ def get_handle(location: str) -> Optional[Callable[[Dict[str, Any]], Optional[st
|
||||||
if not isinstance(loader, importlib.abc.Loader):
|
if not isinstance(loader, importlib.abc.Loader):
|
||||||
return None
|
return None
|
||||||
loader.exec_module(handler)
|
loader.exec_module(handler)
|
||||||
return getattr(handler, "handle")
|
return handler.handle
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Reference in a new issue