]> crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/jedi/__init__.py
Configuracion en desarrollo PC pega
[config.git] / djavu-asus / elpy / rpc-venv / lib / python3.11 / site-packages / jedi / __init__.py
1 """
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
5 references.
6
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.
11
12 Here's a simple example of the autocompletion feature:
13
14 >>> import jedi
15 >>> source = '''
16 ... import json
17 ... json.lo'''
18 >>> script = jedi.Script(source, path='example.py')
19 >>> script
20 <Script: 'example.py' ...>
21 >>> completions = script.complete(3, len('json.lo'))
22 >>> completions
23 [<Completion: load>, <Completion: loads>]
24 >>> print(completions[0].complete)
25 ad
26 >>> print(completions[0].name)
27 load
28 """
29
30 __version__ = '0.19.1'
31
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
39
40 # Finally load the internal plugins. This is only internal.
41 from jedi.plugins import registry
42 del registry