forked from VimPlug/jedi
restructure __main__.py
This commit is contained in:
@@ -1,18 +1,13 @@
|
|||||||
from sys import argv
|
import sys
|
||||||
from os.path import join, dirname, abspath, isdir
|
from os.path import join, dirname, abspath, isdir
|
||||||
|
|
||||||
|
|
||||||
if len(argv) == 2 and argv[1] == 'repl':
|
def _start_linter():
|
||||||
# don't want to use __main__ only for repl yet, maybe we want to use it for
|
|
||||||
# something else. So just use the keyword ``repl`` for now.
|
|
||||||
print(join(dirname(abspath(__file__)), 'api', 'replstartup.py'))
|
|
||||||
elif len(argv) > 1 and argv[1] == 'linter':
|
|
||||||
"""
|
"""
|
||||||
This is a pre-alpha API. You're not supposed to use it at all, except for
|
This is a pre-alpha API. You're not supposed to use it at all, except for
|
||||||
testing. It will very likely change.
|
testing. It will very likely change.
|
||||||
"""
|
"""
|
||||||
import jedi
|
import jedi
|
||||||
import sys
|
|
||||||
|
|
||||||
if '--debug' in sys.argv:
|
if '--debug' in sys.argv:
|
||||||
jedi.set_debug_function()
|
jedi.set_debug_function()
|
||||||
@@ -41,3 +36,11 @@ elif len(argv) > 1 and argv[1] == 'linter':
|
|||||||
pdb.post_mortem()
|
pdb.post_mortem()
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
if len(sys.argv) == 2 and sys.argv[1] == 'repl':
|
||||||
|
# don't want to use __main__ only for repl yet, maybe we want to use it for
|
||||||
|
# something else. So just use the keyword ``repl`` for now.
|
||||||
|
print(join(dirname(abspath(__file__)), 'api', 'replstartup.py'))
|
||||||
|
elif len(sys.argv) > 1 and sys.argv[1] == 'linter':
|
||||||
|
_start_linter()
|
||||||
|
|||||||
Reference in New Issue
Block a user