diff options
Diffstat (limited to 'release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py')
-rw-r--r-- | release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py index 4ba446d6832..b1b751c96ab 100644 --- a/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py +++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py @@ -27,9 +27,9 @@ def is_struct_seq(obj): def complete_names(word, namespace): """Complete variable names or attributes - :param word: word to be completed + :arg word: word to be completed :type word: str - :param namespace: namespace + :arg namespace: namespace :type namespace: dict :returns: completion matches :rtype: list of str @@ -50,12 +50,12 @@ def complete_indices(word, namespace, *, obj=None, base=None): * integer numbers for list * any keys for dictionary - :param word: word to be completed + :arg word: word to be completed :type word: str - :param namespace: namespace + :arg namespace: namespace :type namespace: dict - :param obj: object evaluated from base - :param base: sub-string which can be evaluated into an object. + :arg obj: object evaluated from base + :arg base: sub-string which can be evaluated into an object. :type base: str :returns: completion matches :rtype: list of str @@ -103,11 +103,11 @@ def complete(word, namespace, *, private=True): """Complete word within a namespace with the standard rlcompleter module. Also supports index or key access []. - :param word: word to be completed + :arg word: word to be completed :type word: str - :param namespace: namespace + :arg namespace: namespace :type namespace: dict - :param private: whether private attribute/methods should be returned + :arg private: whether private attribute/methods should be returned :type private: bool :returns: completion matches :rtype: list of str @@ -132,7 +132,7 @@ def complete(word, namespace, *, private=True): matches = complete_indices(word, namespace, base=re_incomplete_index.group(1)) - elif not('[' in word): + elif not ('[' in word): matches = complete_names(word, namespace) elif word[-1] == ']': @@ -182,7 +182,7 @@ def complete(word, namespace, *, private=True): matches = [word + '.'] # separate public from private - public_matches = [match for match in matches if not('._' in match)] + public_matches = [match for match in matches if not ('._' in match)] if private: private_matches = [match for match in matches if '._' in match] return public_matches + private_matches |