]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42403: Fix pyflakes warnings in importlib (GH-23396)
authorVictor Stinner <vstinner@python.org>
Thu, 19 Nov 2020 10:20:57 +0000 (11:20 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 10:20:57 +0000 (11:20 +0100)
Remove unused imports and unused local variables.

Lib/importlib/abc.py
Lib/importlib/machinery.py
Lib/importlib/util.py

index 97d5afa3001930d0f115eae99f3bb39a0c4c14d9..55e70889f22f70c751aeb725727487ff72918a75 100644 (file)
@@ -1,5 +1,4 @@
 """Abstract base classes related to import."""
-from . import _bootstrap
 from . import _bootstrap_external
 from . import machinery
 try:
index 1b2b5c9b4f3407a7a92abeb2d303cd1f7cd3b3ed..9a7757fb6e4494e46c30a5e7feef6da2bde768a4 100644 (file)
@@ -1,7 +1,5 @@
 """The machinery of importlib: finders, loaders, hooks, etc."""
 
-import _imp
-
 from ._bootstrap import ModuleSpec
 from ._bootstrap import BuiltinImporter
 from ._bootstrap import FrozenImporter
index 1e44843a687f2bd6b70208a8ef284f427fd21405..98a0fa54dfd873eb19a1d03bd30a060549866993 100644 (file)
@@ -232,7 +232,6 @@ class _LazyModule(types.ModuleType):
         # Figure out exactly what attributes were mutated between the creation
         # of the module and now.
         attrs_then = self.__spec__.loader_state['__dict__']
-        original_type = self.__spec__.loader_state['__class__']
         attrs_now = self.__dict__
         attrs_updated = {}
         for key, value in attrs_now.items():