summaryrefslogtreecommitdiff
path: root/python/bncompleter.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2019-09-09 18:38:26 -0400
committerJordan Wiens <jordan@psifertex.com>2019-09-09 18:38:26 -0400
commit0629e1176e8d9c45cdbffd6db13f2521ca6038b1 (patch)
tree75cad6da6354848ec3435f74e52738932823f9c8 /python/bncompleter.py
parent1e8b261940bd5897ba31317478e36b53297cee67 (diff)
remove six dependence which was breaking some versions and add function prototype matching
Diffstat (limited to 'python/bncompleter.py')
-rw-r--r--python/bncompleter.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/python/bncompleter.py b/python/bncompleter.py
index fabb7fc2..e1dfab1a 100644
--- a/python/bncompleter.py
+++ b/python/bncompleter.py
@@ -39,9 +39,8 @@ Notes:
"""
import atexit
-from six.moves import builtins
-from six import class_types
import __main__
+import inspect
__all__ = ["Completer"]
@@ -100,8 +99,8 @@ class Completer:
return None
def _callable_postfix(self, val, word):
- if callable(val) and not isinstance(val, class_types):
- word = word + "("
+ if callable(val) and not inspect.isclass(val):
+ word = word + str(inspect.signature(val))
return word
def global_matches(self, text):
@@ -125,7 +124,7 @@ class Completer:
'else'}:
word = word + ' '
matches.append(word)
- for nspace in [self.namespace, builtins.__dict__]:
+ for nspace in [self.namespace, __builtins__.__dict__]:
for word, val in nspace.items():
if word[:n] == text and word not in seen:
seen.add(word)