diff options
| author | hippo91 <guillaume.peillex@gmail.com> | 2020-12-24 11:23:47 +0100 |
|---|---|---|
| committer | hippo91 <guillaume.peillex@gmail.com> | 2020-12-24 11:23:47 +0100 |
| commit | 4f8ac13661b787e8f5ad9cb298ccc60c3935f44d (patch) | |
| tree | c49c97d90d7d7458723764017d368b5a2b18dd07 | |
| parent | 8ad83812e76d7d69249198beb4e18d9805e2d782 (diff) | |
| download | astroid-git-4f8ac13661b787e8f5ad9cb298ccc60c3935f44d.tar.gz | |
Changes the return value of the _precache_zipimporters function so that only zipimporter instances are returned.
| -rw-r--r-- | astroid/interpreter/_import/spec.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py index 125f9a16..ad3ec8f3 100644 --- a/astroid/interpreter/_import/spec.py +++ b/astroid/interpreter/_import/spec.py @@ -285,7 +285,7 @@ def _precache_zipimporters(path=None): pic[entry_path] = zipimport.zipimporter(entry_path) except zipimport.ZipImportError: continue - return pic + return {key: value for key, value in pic.items() if isinstance(value, zipimport.zipimporter)} def _search_zip(modpath, pic): |
