aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py2/IPython/core/completerlib.py
diff options
context:
space:
mode:
authorsmosker <smosker@yandex-team.ru>2022-02-10 16:48:21 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:21 +0300
commitdd14d17a747a9c259858faf2fcc3ea6b92df4e15 (patch)
treef332cd81782832c17c48d8c3b4511924cd9e47fd /contrib/python/ipython/py2/IPython/core/completerlib.py
parentb637e2fa3213638fbabe52c15dad14c8237945ac (diff)
downloadydb-dd14d17a747a9c259858faf2fcc3ea6b92df4e15.tar.gz
Restoring authorship annotation for <smosker@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/core/completerlib.py')
-rw-r--r--contrib/python/ipython/py2/IPython/core/completerlib.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/python/ipython/py2/IPython/core/completerlib.py b/contrib/python/ipython/py2/IPython/core/completerlib.py
index e736ca73d1..a41f1c4af9 100644
--- a/contrib/python/ipython/py2/IPython/core/completerlib.py
+++ b/contrib/python/ipython/py2/IPython/core/completerlib.py
@@ -164,11 +164,11 @@ def get_root_modules():
ip.db['rootmodules_cache'] maps sys.path entries to list of modules.
"""
ip = get_ipython()
- if ip is None:
- # No global shell instance to store cached list of modules.
- # Don't try to scan for modules every time.
- return list(sys.builtin_module_names)
-
+ if ip is None:
+ # No global shell instance to store cached list of modules.
+ # Don't try to scan for modules every time.
+ return list(sys.builtin_module_names)
+
rootmodules_cache = ip.db.get('rootmodules_cache', {})
rootmodules = list(sys.builtin_module_names)
start_time = time()
@@ -207,7 +207,7 @@ def is_importable(module, attr, only_modules):
return not(attr[:2] == '__' and attr[-2:] == '__')
def try_import(mod, only_modules=False):
- mod = mod.rstrip('.')
+ mod = mod.rstrip('.')
try:
m = __import__(mod)
except: