From 5c836a72b6e3d04c9bebbb25ebda7fbfb221ad1d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 2 May 2017 08:57:03 +0200 Subject: [PATCH] Lambda and Function docstrings render better. --- docs/docs/parser.rst | 2 +- jedi/parser/python/tree.py | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/docs/parser.rst b/docs/docs/parser.rst index d9ae642a..9ec82012 100644 --- a/docs/docs/parser.rst +++ b/docs/docs/parser.rst @@ -22,7 +22,7 @@ All nodes and leaves have these methods/properties: Python Parser Tree ------------------ +------------------ .. automodule:: jedi.parser.python.tree :members: diff --git a/jedi/parser/python/tree.py b/jedi/parser/python/tree.py index 33f889c5..46cb2556 100644 --- a/jedi/parser/python/tree.py +++ b/jedi/parser/python/tree.py @@ -450,14 +450,15 @@ class Function(ClassOrFunc): """ Used to store the parsed contents of a python function. - Children: - 0. - 1. - 2. parameter list (including open-paren and close-paren s) - 3. or 5. - 4. or 6. Node() representing function body - 3. -> (if annotation is also present) - 4. annotation (if present) + Children:: + + 0. + 1. + 2. parameter list (including open-paren and close-paren s) + 3. or 5. + 4. or 6. Node() representing function body + 3. -> (if annotation is also present) + 4. annotation (if present) """ type = 'funcdef' @@ -520,12 +521,12 @@ class Lambda(Function): """ Lambdas are basically trimmed functions, so give it the same interface. - Children: + Children:: - 0. - *. for each argument x - -2. - -1. Node() representing body + 0. + *. for each argument x + -2. + -1. Node() representing body """ type = 'lambdef' __slots__ = ()