summaryrefslogtreecommitdiff
path: root/sphinx/pycode
Commit message (Collapse)AuthorAgeFilesLines
* 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+.
* 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: Use OrderedDict to store variable commentsTakeshi KOMIYA2020-07-192-2/+4
| | | | | | It is worthy to keep the order of analyzer.attr_docs to generate document in reproducible. So this uses OrderedDict explicitly to do that. It also helps python3.5 environment.
* Merge pull request #7832 from cool-RR/2020-06-11-raise-fromTakeshi KOMIYA2020-06-291-5/+5
|\ | | | | Fix exception causes all over the codebase
| * Fix exception causes all over the codebaseRam Rachum2020-06-141-5/+5
| |
* | FIX: Fix circular import problemEric Larson2020-06-091-1/+2
|/
* pycode: Detect @overload decoratorsTakeshi KOMIYA2020-05-312-0/+37
|
* Merge branch '3.x' into 7497Takeshi KOMIYA2020-05-073-37/+63
|\
| * Add stacklevel parameter to warnings.warn() callTakeshi KOMIYA2020-05-031-2/+2
| |
| * pycode: Detect @final decoratorsTakeshi KOMIYA2020-04-282-0/+40
| |
| * refactor: pycode: visit_ImportTakeshi KOMIYA2020-04-261-8/+2
| |
| * pycode: Fix wrong type annotationTakeshi KOMIYA2020-04-261-1/+1
| |
| * refactor: pycode: Add VariableCommentPicker.get_qualname_for()Takeshi KOMIYA2020-04-261-26/+18
| |
| * refactor: Add Optional to type annotationsTakeshi KOMIYA2020-04-191-3/+3
| |
* | 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.
* 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
|
* Merge branch '2.0'Takeshi KOMIYA2020-02-093-5/+34
|\
| * autodoc: Support type_comment styled type annotation for variablesTakeshi KOMIYA2020-02-032-3/+7
| |
| * pycode: Support type annotations for variablesTakeshi KOMIYA2020-02-032-5/+30
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-191-0/+80
|\ \ | |/
| * Add sphinx.pycode.ast.parse() and unparse()Takeshi KOMIYA2020-01-131-0/+80
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-012-16/+75
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2020-01-012-2/+2
| |
| * mypy: Enable disallow_incomplete_defs flag for type checkingTakeshi KOMIYA2019-12-301-1/+1
| |
| * Deprecate sphinx.util:detect_encoding() and ModuleAnalyzer.encodingTakeshi KOMIYA2019-12-271-7/+17
| |
| * Fix flake8 violationsTakeshi KOMIYA2019-12-271-2/+2
| |
| * refactor: pycode: do not call endswith twiceTakeshi KOMIYA2019-12-271-3/+2
| |
| * Fix flake8 violationsTakeshi KOMIYA2019-12-271-6/+6
| |
| * Merge pull request #6907 from kpnr/patch-2Takeshi KOMIYA2019-12-271-6/+56
| |\ | | | | | | Non-ASCII & non utf-8 charset corruption fix
| | * Old get_module_source API restored, new version moved to ModuleAnalyzer ↵hkm2019-12-251-2/+52
| | | | | | | | | | | | class, tests updated
| | * Added test case for non ASCII & non UTF8 encoding Windows-1251 in ↵hkm2019-12-151-1/+1
| | | | | | | | | | | | test_pycode section
| | * lost reference to source file name fixed. Test suit updatedhkm2019-12-151-4/+4
| | |
* | | Merge branch '2.0'Takeshi KOMIYA2019-12-221-1/+1
|\ \ \ | |/ /
| * | Merge pull request #6906 from kpnr/patch-1Takeshi KOMIYA2019-12-221-1/+1
| |\ \ | | | | | | | | Update parser.py
| | * | Update parser.pykpnr2019-12-121-1/+1
| | |/ | | | | | | encoding damages non-ASCII characters
* | | Merge branch '2.0'Takeshi KOMIYA2019-12-211-1/+1
|\ \ \ | |/ /
| * | Fix mypy violations (for mypy-0.761)Takeshi KOMIYA2019-12-211-1/+1
| |/
* | Merge branch '2.0'Takeshi KOMIYA2019-12-011-1/+1
|\ \ | |/
| * Fix mypy violations (for mypy-0.750)Takeshi KOMIYA2019-11-301-1/+1
| |
* | Fix inaccurate docstring for TokenProcessor.fetch_token()Jon Dufresne2019-08-151-1/+1
|/
* Fix autodoc: autodoc_member_order_does not refer order of imports (refs: #6574)Takeshi KOMIYA2019-07-131-0/+16
|
* Merge branch '2.1.3' into 2.0Takeshi KOMIYA2019-07-131-1/+1
|\
| * Fix mypy violations (for mypy-0.720)Takeshi KOMIYA2019-07-131-1/+1
| |
* | Migrate to py3 style type annotation: sphinx.pycode.parserTakeshi KOMIYA2019-07-061-79/+40
| |
* | Migrate to py3 style type annotation: sphinx.pycodeTakeshi KOMIYA2019-07-061-20/+10
|/