Better developer tools

This commit is contained in:
Dave Halter
2020-04-18 12:19:14 +02:00
parent 10b2de2c3f
commit 851e0d59f0

View File

@@ -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':