mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Lambda and Function docstrings render better.
This commit is contained in:
@@ -22,7 +22,7 @@ All nodes and leaves have these methods/properties:
|
|||||||
|
|
||||||
|
|
||||||
Python Parser Tree
|
Python Parser Tree
|
||||||
-----------------
|
------------------
|
||||||
|
|
||||||
.. automodule:: jedi.parser.python.tree
|
.. automodule:: jedi.parser.python.tree
|
||||||
:members:
|
:members:
|
||||||
|
|||||||
@@ -450,14 +450,15 @@ class Function(ClassOrFunc):
|
|||||||
"""
|
"""
|
||||||
Used to store the parsed contents of a python function.
|
Used to store the parsed contents of a python function.
|
||||||
|
|
||||||
Children:
|
Children::
|
||||||
0. <Keyword: def>
|
|
||||||
1. <Name>
|
0. <Keyword: def>
|
||||||
2. parameter list (including open-paren and close-paren <Operator>s)
|
1. <Name>
|
||||||
3. or 5. <Operator: :>
|
2. parameter list (including open-paren and close-paren <Operator>s)
|
||||||
4. or 6. Node() representing function body
|
3. or 5. <Operator: :>
|
||||||
3. -> (if annotation is also present)
|
4. or 6. Node() representing function body
|
||||||
4. annotation (if present)
|
3. -> (if annotation is also present)
|
||||||
|
4. annotation (if present)
|
||||||
"""
|
"""
|
||||||
type = 'funcdef'
|
type = 'funcdef'
|
||||||
|
|
||||||
@@ -520,12 +521,12 @@ class Lambda(Function):
|
|||||||
"""
|
"""
|
||||||
Lambdas are basically trimmed functions, so give it the same interface.
|
Lambdas are basically trimmed functions, so give it the same interface.
|
||||||
|
|
||||||
Children:
|
Children::
|
||||||
|
|
||||||
0. <Keyword: lambda>
|
0. <Keyword: lambda>
|
||||||
*. <Param x> for each argument x
|
*. <Param x> for each argument x
|
||||||
-2. <Operator: :>
|
-2. <Operator: :>
|
||||||
-1. Node() representing body
|
-1. Node() representing body
|
||||||
"""
|
"""
|
||||||
type = 'lambdef'
|
type = 'lambdef'
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|||||||
Reference in New Issue
Block a user