1
0
forked from VimPlug/jedi
Commit Graph

51 Commits

Author SHA1 Message Date
Simon Ruggier
338ea42ed9 docstrings: fix "Sphinx param with type" pattern (#807)
* docstrings: fix "Sphinx param with type" pattern

Previously, the pattern only matched if the parameter description
followed on the same line, like so:

    :param type foo: A param named foo.

However, it's also valid for the parameter description to be wrapped
onto the next line, like so:

    :param type foo:
        A param named foo.

This change updates the pattern to match the second example as well, and
adds a test to verify this behaviour.

Fixes #806.

* Add Simon Ruggier to the AUTHORS file
2017-04-27 20:05:48 +02:00
Dave Halter
c124fc91ca Remove further clean_scope_docstring usages. 2017-04-26 09:52:18 +02:00
Dave Halter
f136745a8a follow_param -> infer_param. 2017-04-20 18:09:00 +02:00
Dave Halter
ea1905f121 Refactor the docstring input. 2017-04-20 18:06:40 +02:00
Dave Halter
fbde21166b find_return_types -> infer_return_types. 2017-04-20 09:56:16 +02:00
Dave Halter
b4631d6dd4 Progress in removing the docstring/call signature logic from the parser. 2017-04-18 18:48:05 +02:00
Dave Halter
d6d25db9a2 Remove __str__ from name. 2017-04-12 23:06:11 +02:00
Dave Halter
6190a65f23 The Lambda type should be lambdef, not lambda. Use the grammar types. 2017-04-11 18:28:25 +02:00
Dave Halter
5cd26615e8 Removed the name attribute from lambda. It doesn't exist so don't fake it. 2017-04-11 18:10:35 +02:00
Dave Halter
448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
Dave Halter
9efb3f0af2 More direct parser usage removals. 2017-03-14 19:31:54 +01:00
Dave Halter
97fc3bc23c Refactored the parser calls. Now it's possible to use jedi.parser.python.parse to quickly parse something. 2017-03-14 00:38:58 +01:00
Dave Halter
e7fcc21863 Remove both MergedNodes and AlreadyEvaluated, they are unused. 2017-01-23 20:36:26 +01:00
Dave Halter
d85ceb9222 More cleanups in the parser. 2017-01-23 20:10:02 +01:00
Dave Halter
641ecedcd2 Improve a few anonymous function execution context goto issues. 2016-12-04 22:35:23 +01:00
Dave Halter
dfc06dfe83 A lot of small bug fixes. 2016-12-02 15:08:54 +01:00
Dave Halter
65d3e29146 dostring fixes. 2016-11-13 20:23:17 +01:00
Dave Halter
64b6396d19 Fix one array usage. 2016-10-24 09:58:40 +02:00
Dave Halter
7667cba17e Remove old indent/dedent usages. Now they are not needed anymore. 2016-09-11 13:20:24 +02:00
Dave Halter
1226962922 Remove dedents from the parser tree. No need for them. 2016-09-11 13:03:29 +02:00
Dave Halter
2b4b5f069b Docstring should also be evaluated in class definitions. Fixes #631. 2016-07-30 14:18:20 +02:00
Dave Halter
c4906e0e3f Rework the parser so we can use arbitrary start nodes of the syntax.
This also includes a rework for error recovery in the parser. This is now just possible for file_input parsing, which means for full files.
Includes also a refactoring of the tokenizer. No more do we have to add an additional newline, because it now works correctly (removes certain confusion.
2015-12-20 22:25:41 +01:00
Dave Halter
498e24df94 Fix an issue with combined reversed and yield without for loops. 2015-11-10 09:37:07 +01:00
Dave Halter
b27be47811 Make exact lookups possible in docstrings. 2015-10-14 12:10:48 +02:00
Dave Halter
844a011193 Replacing the types list with a types set. Some tests are failing, though. 2015-10-13 18:03:36 +02:00
Dave Halter
b489019f5b Most integration tests (except 2) pass if we don't always make the use of an ExprStmt. 2015-03-05 01:55:25 +01:00
Dave Halter
5d54922c4b Docstring change, to make non ExprStmt statements possible. 2015-03-05 01:37:47 +01:00
Dave Halter
cdbe26786a Trying to get ird of the weird param generation in the parser tree. 2015-02-10 15:49:26 +01:00
Dave Halter
95b518e9fc Use the Python 3.4 parser for docstring types.
We had to switch, because Ellipsis was otherwise not parseable.
2015-01-13 13:17:21 +01:00
Dave Halter
1725abb1fd Fix issues with docstrings. 2014-12-03 20:30:03 +01:00
Dave Halter
52d4aaebbe small fix for docstring parsing. 2014-11-25 15:10:19 +01:00
Dave Halter
9f45f18ad1 Added a grammar param to the parser. 2014-11-24 01:10:39 +01:00
Dave Halter
164518b993 Get docstrings working. 2014-11-20 02:19:01 +01:00
Dave Halter
332a16a27e elements in tuples/lists in docstrings were not executed. 2014-07-31 17:13:56 +02:00
immerrr
194d87bbad Add basic numpydoc support 2014-07-27 12:51:31 +04:00
Pawel Palucki
d359f5d043 Sphinx oneline param type declaration feature
allows for type definition in ":param keyword"
2014-07-26 22:15:56 +02:00
Dave Halter
5784e23b4e tuples are also a possiblity in docstring type annotations 2014-04-02 21:17:57 +02:00
Dave Halter
bb72ecfa8a docstring annotation types should be instantiated -> execute them, fixes #178 2014-04-02 20:42:18 +02:00
Dave Halter
16e3e327d3 docstring returns now also strip rst roles and work with more complicated patterns 2014-03-28 01:41:24 +01:00
Dave Halter
fb34864ace fix docstrings that didn't work with multiple return classes of other modules (or in tuples) 2014-03-27 20:23:41 +01:00
Dave Halter
eea2d0c8c5 param docstrings cleaned up - #370 2014-03-27 19:51:35 +01:00
Dave Halter
b680246195 docstring working for local definitions as well 2014-03-27 12:34:53 +01:00
Dave Halter
cffdcd2571 correct developer documentation a little bit 2014-03-11 15:38:46 +01:00
Dave Halter
44e16c11e5 fixed docstr problems with unified interfaces 2014-02-26 02:33:18 +01:00
Dave Halter
5e5bb618ea remove token.py, docstrings are now just normal tokens until used 2014-02-26 01:13:38 +01:00
Jean-Louis Fuchs
34e89fa1c5 Merge branch 'dev' into get_code_fidelity
Conflicts:
	jedi/evaluate/docstrings.py
	jedi/parser/representation.py

Resolving merge problems:
* Introducing docstring for compiled.fake
* Partly fixing poor decision in TokenDocstring __init__
2014-01-28 00:37:06 +01:00
Dave Halter
cd40e213ce Remove UserContextParser again from docstring stuff, not really needed there. use a simpler solution 2014-01-17 03:06:07 +01:00
Dave Halter
19b0e1d5b6 reenable check_user_statement in parser, that did the whole user names calculation 2014-01-17 02:48:00 +01:00
Dave Halter
b30a186f8f remove user_stmt and user_scope stuff - yes! 2014-01-17 02:34:09 +01:00
Dave Halter
39c16237da remove a circular dependency for docstrings. 2014-01-05 14:45:01 +01:00