]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/jedi/__main__.py
2 from os
.path
import join
, dirname
, abspath
, isdir
7 This is a pre-alpha API. You're not supposed to use it at all, except for
8 testing. It will very likely change.
12 if '--debug' in sys
.argv
:
13 jedi
.set_debug_function()
15 for path
in sys
.argv
[2:]:
16 if path
.startswith('--'):
23 for root
, dirnames
, filenames
in os
.walk(path
):
24 for filename
in fnmatch
.filter(filenames
, '*.py'):
25 paths
.append(os
.path
.join(root
, filename
))
31 for error
in jedi
.Script(path
=p
)._analysis
():
34 if '--pdb' in sys
.argv
:
49 jedi
.set_debug_function()
52 completions
= jedi
.Script(sys
.argv
[2]).complete()
56 except Exception as e
:
63 if len(sys
.argv
) == 2 and sys
.argv
[1] == 'repl':
64 # don't want to use __main__ only for repl yet, maybe we want to use it for
65 # something else. So just use the keyword ``repl`` for now.
66 print(join(dirname(abspath(__file__
)), 'api', 'replstartup.py'))
67 elif len(sys
.argv
) > 1 and sys
.argv
[1] == '_linter':
69 elif len(sys
.argv
) > 1 and sys
.argv
[1] == '_complete':
72 print('Command not implemented: %s' % sys
.argv
[1])