From 851e0d59f0d80dd64d75c31cf88ae7b480be05dc Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 18 Apr 2020 12:19:14 +0200 Subject: [PATCH] Better developer tools --- jedi/__main__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jedi/__main__.py b/jedi/__main__.py index a02b9a1f..6b442533 100644 --- a/jedi/__main__.py +++ b/jedi/__main__.py @@ -44,13 +44,20 @@ def _complete(): import jedi import pdb + if '-d' in sys.argv: + sys.argv.remove('-d') + jedi.set_debug_function() + try: - for c in jedi.Script(sys.argv[2]).complete(): + completions = jedi.Script(sys.argv[2]).complete() + for c in completions: c.docstring() c.type except Exception as e: - print(e) + print(repr(e)) pdb.post_mortem() + else: + print(completions) if len(sys.argv) == 2 and sys.argv[1] == 'repl':