mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Better developer tools
This commit is contained in:
@@ -44,13 +44,20 @@ def _complete():
|
|||||||
import jedi
|
import jedi
|
||||||
import pdb
|
import pdb
|
||||||
|
|
||||||
|
if '-d' in sys.argv:
|
||||||
|
sys.argv.remove('-d')
|
||||||
|
jedi.set_debug_function()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for c in jedi.Script(sys.argv[2]).complete():
|
completions = jedi.Script(sys.argv[2]).complete()
|
||||||
|
for c in completions:
|
||||||
c.docstring()
|
c.docstring()
|
||||||
c.type
|
c.type
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(repr(e))
|
||||||
pdb.post_mortem()
|
pdb.post_mortem()
|
||||||
|
else:
|
||||||
|
print(completions)
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) == 2 and sys.argv[1] == 'repl':
|
if len(sys.argv) == 2 and sys.argv[1] == 'repl':
|
||||||
|
|||||||
Reference in New Issue
Block a user