module documentation
Undocumented
| Class | |
Python source code parser to pick up comment after assignment. |
| Class | |
Better token wrapper for tokenize module. |
| Class | |
Processes tokens from source code lines. |
| Function | extract |
Support for doc comment as found in sphinx. |
| Function | extract |
Same as extract_doc_comment_after but fetch the comment before the assignment. |
| Variable | comment |
Undocumented |
| Variable | indent |
Undocumented |
def extract_doc_comment_after(node:
ast.Assign | ast.AnnAssign, lines: Sequence[ str]) -> tuple[ int, str] | None:
(source)
¶
Support for doc comment as found in sphinx.
| Parameters | |
node:ast.Assign | ast.AnnAssign | the assignment node |
lines:Sequence[ | the lines of the source code of the module, as generated by code.splitlines(keepends=True). |
| Returns | |
tuple[ | A tuple linenumber, docstring or None if the assignment doesn't have a doc comment. |
def extract_doc_comment_before(node:
ast.Assign | ast.AnnAssign, lines: Sequence[ str]) -> tuple[ int, str] | None:
(source)
¶
Same as extract_doc_comment_after but fetch the comment before the assignment.