summaryrefslogtreecommitdiff
path: root/sphinx/pycode/ast.py
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Use PEP-526 based variable annotation (sphinx.pycode)Takeshi KOMIYA2021-03-271-5/+5
|
* Update type annotationsTakeshi KOMIYA2021-02-091-2/+2
|
* Merge branch '3.x'Takeshi KOMIYA2021-01-161-0/+4
|\
| * Fix #8652: autodoc: variable comments are ignored if invalid type comments foundTakeshi KOMIYA2021-01-101-0/+4
| | | | | | | | | | | | To avoid the crash of ModuleAnalyzer from invalid type comments, this start to retry parsing without type_comments=False when `ast.parse()` raises SyntaxError.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* | Merge branch '3.x'Takeshi KOMIYA2020-11-121-2/+1
|\ \ | |/
| * Sort imports with isortFrançois Freitag2020-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip.
* | Fix mypy violationsTakeshi KOMIYA2020-10-241-2/+2
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-10-241-5/+12
|\ \ | |/
| * pycode: ast.unparse() construct number literals using source codeTakeshi KOMIYA2020-10-051-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Developers can write number literals in several ways. For example, decimal (1234), hexadecimal (0x1234), octal decimal (0o1234) and so on. But, AST module don't mind how the numbers written in the code. As a result, ast.unparse() could not reproduce the original form of number literals. This allows to construct number literals as possible using original source code. Note: This is only available in Python 3.8+.
* | Merge branch '3.x' into masterTakeshi KOMIYA2020-10-041-2/+16
|\ \ | |/
| * Fix #7964: autodoc: Tuple in default value is wrongly renderedTakeshi KOMIYA2020-10-031-2/+16
| | | | | | | | This implements tuple literal support to sphinx.pycode.ast.unparse().
* | refactor pycode: sort methodsTakeshi KOMIYA2020-05-271-7/+6
| |
* | Fix a mypy violationTakeshi KOMIYA2020-05-271-1/+1
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-05-171-92/+121
|\ \ | |/
| * Merge branch '3.x' into 7497Takeshi KOMIYA2020-05-071-1/+1
| |\
| * | refactor: Sort visitor methods of _UnparseVisitorTakeshi KOMIYA2020-05-071-62/+62
| | |
| * | Group together methods that relate to a python 3.8 deprecationEric Wieser2020-04-171-13/+15
| | | | | | | | | | | | This will make it easier to remove them all at once in future
| * | Rewrite unparse to use ast.NodeVisitorEric Wieser2020-04-171-90/+117
| | | | | | | | | | | | This should make it possible to reuse the same visitor to generate RST code.
* | | refactor: Update type annotationsTakeshi KOMIYA2020-05-021-0/+11
| |/ |/|
* | refactor: Add Optional to type annotationsTakeshi KOMIYA2020-04-191-3/+3
|/
* Deduplicate some code in `pycode.ast`Eric Wieser2020-04-161-22/+15
|
* Fix #7461: autodoc: empty tuple in type annotation is not shown correctlyTakeshi KOMIYA2020-04-121-1/+4
|
* Fix #7304: pycode: Support operators (BinOp, BoolOp and UnaryOp)Takeshi KOMIYA2020-03-141-1/+33
|
* py domain: Support lambda functions in function signatureTakeshi KOMIYA2020-02-161-1/+67
|
* autodoc: Support type_comment styled type annotation for variablesTakeshi KOMIYA2020-02-031-0/+2
|
* Add sphinx.pycode.ast.parse() and unparse()Takeshi KOMIYA2020-01-131-0/+80