mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-01 04:15:23 +08:00
Fix a lot of old docs code that doesn't exist anymore
This commit is contained in:
@@ -64,21 +64,23 @@ The parser creates a syntax tree that |jedi| analyses and tries to understand.
|
||||
The grammar that this parsers uses is very similar to the official Python
|
||||
`grammar files <https://docs.python.org/3/reference/grammar.html>`_.
|
||||
|
||||
.. _evaluate:
|
||||
|
||||
Evaluation of python code (evaluate/__init__.py)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. automodule:: jedi.evaluate
|
||||
|
||||
Evaluation Representation (evaluate/representation.py)
|
||||
Evaluation Contexts (evaluate/base_context.py)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. automodule:: jedi.evaluate.representation
|
||||
.. automodule:: jedi.evaluate.base_context
|
||||
|
||||
.. inheritance-diagram::
|
||||
jedi.evaluate.instance.TreeInstance
|
||||
jedi.evaluate.representation.ClassContext
|
||||
jedi.evaluate.representation.FunctionContext
|
||||
jedi.evaluate.representation.FunctionExecutionContext
|
||||
jedi.evaluate.context.instance.TreeInstance
|
||||
jedi.evaluate.context.klass.ClassContext
|
||||
jedi.evaluate.context.function.FunctionContext
|
||||
jedi.evaluate.context.function.FunctionExecutionContext
|
||||
:parts: 1
|
||||
|
||||
|
||||
@@ -111,7 +113,6 @@ Core Extensions is a summary of the following topics:
|
||||
|
||||
- :ref:`Iterables & Dynamic Arrays <iterables>`
|
||||
- :ref:`Dynamic Parameters <dynamic>`
|
||||
- :ref:`Diff Parser <diff-parser>`
|
||||
- :ref:`Docstrings <docstrings>`
|
||||
- :ref:`Refactoring <refactoring>`
|
||||
|
||||
@@ -121,13 +122,13 @@ without some features.
|
||||
|
||||
.. _iterables:
|
||||
|
||||
Iterables & Dynamic Arrays (evaluate/iterable.py)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Iterables & Dynamic Arrays (evaluate/context/iterable.py)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To understand Python on a deeper level, |jedi| needs to understand some of the
|
||||
dynamic features of Python like lists that are filled after creation:
|
||||
|
||||
.. automodule:: jedi.evaluate.iterable
|
||||
.. automodule:: jedi.evaluate.context.iterable
|
||||
|
||||
|
||||
.. _dynamic:
|
||||
|
||||
@@ -268,7 +268,7 @@ def use_metaclass(meta, *bases):
|
||||
""" Create a class with a metaclass. """
|
||||
if not bases:
|
||||
bases = (object,)
|
||||
return meta("HackClass", bases, {})
|
||||
return meta("Py2CompatibilityMetaClass", bases, {})
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@@ -17,7 +17,8 @@ said, the typical entry point for static analysis is calling
|
||||
``eval_expr_stmt``. There's separate logic for autocompletion in the API, the
|
||||
evaluator is all about evaluating an expression.
|
||||
|
||||
TODO this paragraph is not what jedi does anymore.
|
||||
TODO this paragraph is not what jedi does anymore, it's similar, but not the
|
||||
same.
|
||||
|
||||
Now you need to understand what follows after ``eval_expr_stmt``. Let's
|
||||
make an example::
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
"""
|
||||
Contexts are the "values" that Python would return. However Contexts are at the
|
||||
same time also the "contexts" that a user is currently sitting in.
|
||||
|
||||
A ContextSet is typically used to specify the return of a function or any other
|
||||
static analysis operation. In jedi there are always multiple returns and not
|
||||
just one.
|
||||
"""
|
||||
from parso.python.tree import ExprStmt, CompFor
|
||||
|
||||
from jedi import debug
|
||||
|
||||
Reference in New Issue
Block a user