mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Create an autosummary for Jedi's API
This commit is contained in:
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.abspath('..'))
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.todo',
|
||||
'sphinx.ext.intersphinx', 'sphinx.ext.inheritance_diagram',
|
||||
'sphinx_rtd_theme']
|
||||
'sphinx_rtd_theme', 'sphinx.ext.autosummary']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
@@ -19,6 +19,32 @@ The API consists of a few different parts:
|
||||
- A way to work with different :ref:`Folders / Projects <projects>`
|
||||
- Helpful functions: :func:`.preload_module` and :func:`.set_debug_function`
|
||||
|
||||
The methods that you are most likely going to use to work with Jedi are the
|
||||
following ones:
|
||||
|
||||
.. currentmodule:: jedi
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
Script.complete
|
||||
Script.goto
|
||||
Script.infer
|
||||
Script.help
|
||||
Script.get_signatures
|
||||
Script.get_references
|
||||
Script.get_context
|
||||
Script.get_names
|
||||
Script.get_syntax_errors
|
||||
Script.rename
|
||||
Script.inline
|
||||
Script.extract_variable
|
||||
Script.extract_function
|
||||
Script.search
|
||||
Script.complete_search
|
||||
Project.search
|
||||
Project.complete_search
|
||||
|
||||
Script
|
||||
------
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ class Script(object):
|
||||
@validate_line_column
|
||||
def complete(self, line=None, column=None, **kwargs):
|
||||
"""
|
||||
Return :class:`.Completion` objects.
|
||||
Completes objects under the cursor.
|
||||
|
||||
Those objects contain information about the completions, more than just
|
||||
names.
|
||||
@@ -428,9 +428,9 @@ class Script(object):
|
||||
|
||||
def complete_search(self, string, **kwargs):
|
||||
"""
|
||||
Like :meth:`.Script.search`, but returns completions for the current
|
||||
string. If you want to have all possible definitions in a file you can
|
||||
also provide an empty string.
|
||||
Like :meth:`.Script.search`, but completes that string. If you want to
|
||||
have all possible definitions in a file you can also provide an empty
|
||||
string.
|
||||
|
||||
:param bool all_scopes: Default False; searches not only for
|
||||
definitions on the top level of a module level, but also in
|
||||
@@ -653,8 +653,7 @@ class Script(object):
|
||||
@_no_python2_support
|
||||
def rename(self, line=None, column=None, **kwargs):
|
||||
"""
|
||||
Returns an object that you can use to rename the variable under the
|
||||
cursor and its references to a different name.
|
||||
Renames all references of the variable under the cursor.
|
||||
|
||||
:param new_name: The variable under the cursor will be renamed to this
|
||||
string.
|
||||
@@ -671,7 +670,8 @@ class Script(object):
|
||||
@validate_line_column
|
||||
def extract_variable(self, line=None, column=None, **kwargs):
|
||||
"""
|
||||
Moves an expression of a selected range to a new statemenet.
|
||||
Moves an expression to a new statemenet.
|
||||
|
||||
For example if you have the cursor on ``foo`` and provide a
|
||||
``new_name`` called ``bar``::
|
||||
|
||||
@@ -712,7 +712,8 @@ class Script(object):
|
||||
@_no_python2_support
|
||||
def extract_function(self, line, column, **kwargs):
|
||||
"""
|
||||
Moves an expression of a selected range to a new function.
|
||||
Moves an expression to a new function.
|
||||
|
||||
For example if you have the cursor on ``foo`` and provide a
|
||||
``new_name`` called ``bar``::
|
||||
|
||||
|
||||
@@ -236,9 +236,8 @@ class Project(object):
|
||||
|
||||
def complete_search(self, string, **kwargs):
|
||||
"""
|
||||
Like :meth:`.Project.search`, but returns completions for the current
|
||||
string. An empty string lists all definitions in a project, so be
|
||||
careful with that.
|
||||
Like :meth:`.Script.search`, but completes that string. An empty string
|
||||
lists all definitions in a project, so be careful with that.
|
||||
|
||||
:param bool all_scopes: Default False; searches not only for
|
||||
definitions on the top level of a module level, but also in
|
||||
|
||||
Reference in New Issue
Block a user