Commit Graph

6 Commits

Author SHA1 Message Date
Takeshi KOMIYA
0b32e72635 pycode: ast.unparse() construct number literals using source code
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+.
2020-10-05 01:08:14 +09:00
Takeshi KOMIYA
785f4d695c Fix #7964: autodoc: Tuple in default value is wrongly rendered
This implements tuple literal support to sphinx.pycode.ast.unparse().
2020-10-03 12:01:20 +09:00
Takeshi KOMIYA
c8355234eb Fix #7461: autodoc: empty tuple in type annotation is not shown correctly 2020-04-12 13:00:04 +09:00
Takeshi KOMIYA
f6d58bbefc Fix #7304: pycode: Support operators (BinOp, BoolOp and UnaryOp) 2020-03-14 13:51:49 +09:00
Takeshi KOMIYA
76b492aa98 py domain: Support lambda functions in function signature 2020-02-16 12:57:14 +09:00
Takeshi KOMIYA
729ffa1fcd Add sphinx.pycode.ast.parse() and unparse() 2020-01-13 13:15:33 +09:00