]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/jedi/__init__.py
2 Jedi is a static analysis tool for Python that is typically used in
3 IDEs/editors plugins. Jedi has a focus on autocompletion and goto
4 functionality. Other features include refactoring, code search and finding
7 Jedi has a simple API to work with. There is a reference implementation as a
8 `VIM-Plugin <https://github.com/davidhalter/jedi-vim>`_. Autocompletion in your
9 REPL is also possible, IPython uses it natively and for the CPython REPL you
10 can install it. Jedi is well tested and bugs should be rare.
12 Here's a simple example of the autocompletion feature:
18 >>> script = jedi.Script(source, path='example.py')
20 <Script: 'example.py' ...>
21 >>> completions = script.complete(3, len('json.lo'))
23 [<Completion: load>, <Completion: loads>]
24 >>> print(completions[0].complete)
26 >>> print(completions[0].name)
30 __version__
= '0.19.1'
32 from jedi
.api
import Script
, Interpreter
, set_debug_function
, preload_module
33 from jedi
import settings
34 from jedi
.api
.environment
import find_virtualenvs
, find_system_environments
, \
35 get_default_environment
, InvalidPythonEnvironment
, create_environment
, \
36 get_system_environment
, InterpreterEnvironment
37 from jedi
.api
.project
import Project
, get_default_project
38 from jedi
.api
.exceptions
import InternalError
, RefactoringError
40 # Finally load the internal plugins. This is only internal.
41 from jedi
.plugins
import registry