diff options
author | Victor Stinner <vstinner@python.org> | 2024-06-14 20:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 20:39:50 +0200 |
commit | 05df063ad80becc1ba6bd07d67b55b5965f32375 (patch) | |
tree | f0c29d986aafdc49366a8627702e10dab54a887e /Lib/importlib/machinery.py | |
parent | ed60ab5fab6d187068cb3e0f0d4192ebf3a228b7 (diff) | |
download | cpython-05df063ad80becc1ba6bd07d67b55b5965f32375.tar.gz cpython-05df063ad80becc1ba6bd07d67b55b5965f32375.zip |
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/machinery.py')
-rw-r--r-- | Lib/importlib/machinery.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/importlib/machinery.py b/Lib/importlib/machinery.py index fbd30b159fb..6e294d59bfd 100644 --- a/Lib/importlib/machinery.py +++ b/Lib/importlib/machinery.py @@ -19,3 +19,11 @@ from ._bootstrap_external import NamespaceLoader def all_suffixes(): """Returns a list of all recognized module suffixes for this process""" return SOURCE_SUFFIXES + BYTECODE_SUFFIXES + EXTENSION_SUFFIXES + + +__all__ = ['AppleFrameworkLoader', 'BYTECODE_SUFFIXES', 'BuiltinImporter', + 'DEBUG_BYTECODE_SUFFIXES', 'EXTENSION_SUFFIXES', + 'ExtensionFileLoader', 'FileFinder', 'FrozenImporter', 'ModuleSpec', + 'NamespaceLoader', 'OPTIMIZED_BYTECODE_SUFFIXES', 'PathFinder', + 'SOURCE_SUFFIXES', 'SourceFileLoader', 'SourcelessFileLoader', + 'WindowsRegistryFinder', 'all_suffixes'] |