aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-04-21 22:04:37 +0100
committerGravatar GitHub <[email protected]>2022-04-21 22:04:37 +0100
commit21628902bb370d4bd4d83e1320c4dd4f19cfbc35 (patch)
treee93f1bc4a92b7b25c1d67733de3fd9134c4af93c
parentDon't look for extensions in packages prefixed with an underscore (diff)
parentType-hint `ignore_module` (diff)
Merge pull request #67 from python-discord/mbaruh/document
Type-hint `ignore_module`
-rw-r--r--botcore/utils/_extensions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/botcore/utils/_extensions.py b/botcore/utils/_extensions.py
index 5614b7ec..536a0715 100644
--- a/botcore/utils/_extensions.py
+++ b/botcore/utils/_extensions.py
@@ -20,7 +20,7 @@ def unqualify(name: str) -> str:
return name.rsplit(".", maxsplit=1)[-1]
-def ignore_module(module) -> bool:
+def ignore_module(module: pkgutil.ModuleInfo) -> bool:
"""Return whether the module with name `name` should be ignored."""
return any(name.startswith("_") for name in module.name.split("."))