diff options
| author | hippo91 <guillaume.peillex@gmail.com> | 2020-12-24 11:24:20 +0100 |
|---|---|---|
| committer | hippo91 <guillaume.peillex@gmail.com> | 2020-12-24 11:24:20 +0100 |
| commit | 75910f4e23db3e4b1bcb54710792334a708b6b6e (patch) | |
| tree | dfbc5241b357e9c739d86cd57c5e3b9296553cfb | |
| parent | 4f8ac13661b787e8f5ad9cb298ccc60c3935f44d (diff) | |
| download | astroid-git-75910f4e23db3e4b1bcb54710792334a708b6b6e.tar.gz | |
Adds docstring to the _precache_zipimporters function
| -rw-r--r-- | astroid/interpreter/_import/spec.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py index ad3ec8f3..303d086d 100644 --- a/astroid/interpreter/_import/spec.py +++ b/astroid/interpreter/_import/spec.py @@ -270,6 +270,16 @@ def _cached_set_diff(left, right): def _precache_zipimporters(path=None): + """ + For each path that has not been already cached + in the sys.path_importer_cache, create a new zipimporter + instance and store it into the cache. + Return a dict associating all paths, stored into the cache, to corresponding + zipimporter instances + + :param path: paths that has to be added into the cache + :return: association between paths stored into the cache and zipimporter instances + """ pic = sys.path_importer_cache # When measured, despite having the same complexity (O(n)), |
