summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/util.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-06-14 18:39:50 (GMT)
committerGitHub <noreply@github.com>2024-06-14 18:39:50 (GMT)
commit05df063ad80becc1ba6bd07d67b55b5965f32375 (patch)
treef0c29d986aafdc49366a8627702e10dab54a887e /Lib/importlib/util.py
parented60ab5fab6d187068cb3e0f0d4192ebf3a228b7 (diff)
downloadcpython-05df063ad80becc1ba6bd07d67b55b5965f32375.zip
cpython-05df063ad80becc1ba6bd07d67b55b5965f32375.tar.gz
cpython-05df063ad80becc1ba6bd07d67b55b5965f32375.tar.bz2
gh-120417: Fix "imported but unused" linter warnings (#120461)
Add __all__ to the following modules: importlib.machinery, importlib.util and xml.sax. Add also "# noqa: F401" in collections.abc, subprocess and xml.sax. * Sort __all__; remove collections.abc.__all__; remove private names * Add tests
Diffstat (limited to 'Lib/importlib/util.py')
-rw-r--r--Lib/importlib/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index c94a148..7243d05 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -270,3 +270,9 @@ class LazyLoader(Loader):
loader_state['is_loading'] = False
module.__spec__.loader_state = loader_state
module.__class__ = _LazyModule
+
+
+__all__ = ['LazyLoader', 'Loader', 'MAGIC_NUMBER',
+ 'cache_from_source', 'decode_source', 'find_spec',
+ 'module_from_spec', 'resolve_name', 'source_from_cache',
+ 'source_hash', 'spec_from_file_location', 'spec_from_loader']