##// END OF EJS Templates
Silence PickleShare warnings when completing root modules....
Matthias Bussonnier -
Show More
@@ -117,7 +117,10 b' def get_root_modules():'
117 # Don't try to scan for modules every time.
117 # Don't try to scan for modules every time.
118 return list(sys.builtin_module_names)
118 return list(sys.builtin_module_names)
119
119
120 rootmodules_cache = ip.db.get('rootmodules_cache', {})
120 if getattr(ip.db, "_mock", False):
121 rootmodules_cache = {}
122 else:
123 rootmodules_cache = ip.db.get("rootmodules_cache", {})
121 rootmodules = list(sys.builtin_module_names)
124 rootmodules = list(sys.builtin_module_names)
122 start_time = time()
125 start_time = time()
123 store = False
126 store = False
@@ -42,6 +42,8 b' try:'
42 except ModuleNotFoundError:
42 except ModuleNotFoundError:
43
43
44 class PickleShareDB: # type: ignore [no-redef]
44 class PickleShareDB: # type: ignore [no-redef]
45 _mock = True
46
45 def __init__(self, path):
47 def __init__(self, path):
46 pass
48 pass
47
49
General Comments 0
You need to be logged in to leave comments. Login now