diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-29 14:22:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-30 02:00:41 +0300 |
commit | ca983d1825fdef95688368da5fb4224bb4a12349 (patch) | |
tree | d0657f7cdf6f6b92c2ebca817e45c3e01a9f3f93 /release/scripts/modules/console | |
parent | 3d7cf808b8eeb98b20587298282c7b6d69271cba (diff) |
Cleanup: pep8
Diffstat (limited to 'release/scripts/modules/console')
-rw-r--r-- | release/scripts/modules/console/complete_import.py | 10 | ||||
-rw-r--r-- | release/scripts/modules/console/complete_namespace.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/console/intellisense.py | 14 |
3 files changed, 14 insertions, 14 deletions
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py index f28f61b303d..e7218594a86 100644 --- a/release/scripts/modules/console/complete_import.py +++ b/release/scripts/modules/console/complete_import.py @@ -112,10 +112,10 @@ def module_list(path): folder_list = [] #folder_list = glob.glob(os.path.join(path,'*')) folder_list = [ - p for p in folder_list - if (os.path.exists(os.path.join(path, p, '__init__.py')) or - p[-3:] in {'.py', '.so'} or - p[-4:] in {'.pyc', '.pyo', '.pyd'})] + p for p in folder_list + if (os.path.exists(os.path.join(path, p, '__init__.py')) or + p[-3:] in {'.py', '.so'} or + p[-4:] in {'.pyc', '.pyo', '.pyd'})] folder_list = [os.path.basename(p).split('.')[0] for p in folder_list] return folder_list @@ -161,7 +161,7 @@ def complete(line): if (not hasattr(m, '__file__')) or (not only_modules) or\ (hasattr(m, '__file__') and '__init__' in m.__file__): completion_list = [attr for attr in dir(m) - if is_importable(m, attr)] + if is_importable(m, attr)] else: completion_list = [] completion_list.extend(getattr(m, '__all__', [])) diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/console/complete_namespace.py index 992bb72aa08..3f223ba93dc 100644 --- a/release/scripts/modules/console/complete_namespace.py +++ b/release/scripts/modules/console/complete_namespace.py @@ -85,7 +85,7 @@ def complete_indices(word, namespace, obj=None, base=None): >>> complete_indices("foo['b", {'foo': {'bar':0, 1:2}}, base='foo') ["foo['bar']"] """ - #FIXME: 'foo["b' + # FIXME: 'foo["b' if base is None: base = word if obj is None: @@ -148,7 +148,7 @@ def complete(word, namespace, private=True): if re_incomplete_index: # ignore incomplete index at the end, e.g 'a[1' -> 'a' matches = complete_indices(word, namespace, - base=re_incomplete_index.group(1)) + base=re_incomplete_index.group(1)) elif not('[' in word): matches = complete_names(word, namespace) diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py index b694cceafea..84d4bff281d 100644 --- a/release/scripts/modules/console/intellisense.py +++ b/release/scripts/modules/console/intellisense.py @@ -121,8 +121,8 @@ def expand(line, cursor, namespace, private=True): """ if line[:cursor].strip().endswith('('): from . import complete_calltip - matches, word, scrollback = complete_calltip.complete(line, - cursor, namespace) + matches, word, scrollback = complete_calltip.complete( + line, cursor, namespace) prefix = os.path.commonprefix(matches)[len(word):] no_calltip = False else: @@ -138,11 +138,11 @@ def expand(line, cursor, namespace, private=True): white_space = " " + (" " * (cursor + len(prefix))) word_prefix = word + prefix scrollback = '\n'.join( - [white_space + m[len(word_prefix):] - if (word_prefix and m.startswith(word_prefix)) - else - white_space + m.split('.')[-1] - for m in matches]) + [white_space + m[len(word_prefix):] + if (word_prefix and m.startswith(word_prefix)) + else + white_space + m.split('.')[-1] + for m in matches]) no_calltip = True |