class documentation
class ParsedTypeDocstring(TypeDocstring, ParsedDocstring): (source)
Constructor: ParsedTypeDocstring(annotation, warns_on_unknown_tokens, lineno)
Add ParsedDocstring
interface on top of TypeDocstring
and allow to parse types from nodes.Node
objects, providing the --process-types option.
Method | __init__ |
Undocumented |
Method | to |
Not implemented at this time :/ |
Method | to |
Present the type as a stan tree. |
Constant | FIELDS |
Undocumented |
Property | has |
Does this docstring have a non-empty body? |
Method | _convert |
Convert TokenType.OBJ and PEP 484 like TokenType.DELIMITER type to stan, merge them together. Leave the rest untouched. |
Method | _convert |
Convert type to Tag object. |
Method | _tokenize |
Undocumented |
Instance Variable | _lineno |
Undocumented |
Instance Variable | _tokens |
Undocumented |
Inherited from TypeDocstring
:
Method | __str__ |
No summary |
Instance Variable | warnings |
Undocumented |
Class Method | _tokenize |
Split the string in tokens for further processing. |
Static Method | _recombine |
Merge the special literal choices tokens together. |
Method | _build |
Undocumented |
Method | _convert |
Undocumented |
Method | _token |
Find the type of a token. Types are defined in C{TokenType} enum. |
Method | _trigger |
Append some warnings. |
Class Variable | _ast |
Undocumented |
Class Variable | _ast |
Undocumented |
Class Variable | _default |
Undocumented |
Class Variable | _natural |
Undocumented |
Class Variable | _natural |
Undocumented |
Class Variable | _token |
Undocumented |
Instance Variable | _annotation |
Undocumented |
Instance Variable | _warns |
Undocumented |
Inherited from ParsedDocstring
(via TypeDocstring
):
Method | get |
Returns the summary of this docstring. |
Method | get |
The table of contents of the docstring if titles are defined or None. |
Method | to |
Translate this docstring to a string. The default implementation depends on to_node . |
Instance Variable | fields |
A list of Field s, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings. |
Instance Variable | _stan |
Undocumented |
def __init__(self, annotation:
nodes.document | str
, warns_on_unknown_tokens: bool
= False, lineno: int
= 0):
(source)
¶
Undocumented
Does this docstring have a non-empty body?
The body is the part of the docstring that remains after the fields have been split off.
def _convert_obj_tokens_to_stan(self, tokens:
list[ tuple[ Any, TokenType]]
, docstring_linker: DocstringLinker
) -> list[ tuple[ Any, TokenType]]
:
(source)
¶
Convert TokenType.OBJ
and PEP 484 like TokenType.DELIMITER
type to stan, merge them together. Leave the rest untouched.
Parameters | |
tokens:list[ | List of tuples: (token, type) |
docstringDocstringLinker | Undocumented |
Returns | |
list[ | Undocumented |