Commit Graph

4203 Commits

Author SHA1 Message Date
Dave Halter
5791860861 Actual forward reference annotations are working pretty smooth now. 2015-12-20 22:57:41 +01: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
9a93d599da Fix: __module__ doesn't need to be properly defined. 2015-12-20 02:35:23 +01:00
Dave Halter
b2a691a69a PEP 484 support also means that we should evaluate comments in the future. 2015-12-19 11:10:05 +01:00
Dave Halter
a2905ae078 Implement get_parent_until for Comprehension. 2015-12-18 23:18:21 +01:00
Dave Halter
e73b1a683a Tests for python2 print statement. 2015-12-18 17:57:25 +01:00
Dave Halter
23f40d8998 Merge branch 'linter' of https://github.com/reinhrst/jedi into pep484
Conflicts:
	AUTHORS.txt
2015-12-17 23:46:20 +01:00
Claude
160b6fca51 show off some power :) 2015-12-17 15:29:49 +01:00
Claude
6bee214948 catch error in certain non-pep0484 annotations 2015-12-17 15:23:40 +01:00
Claude
8bf2fe77e2 add some more non-pep0484-junk to the test 2015-12-17 15:06:20 +01:00
Dave Halter
cc3c538d9d Merge branch 'buildout-unicode-decode-error' of https://github.com/mfussenegger/jedi into linter 2015-12-17 12:50:26 +01:00
Dave Halter
54b1b2be74 Fix: flow analysis crashed when using in combination with different modules. 2015-12-17 12:37:26 +01:00
Dave Halter
3d79d0994e Fix: is_class() on Instance was not implemented. 2015-12-15 16:44:28 +01:00
Dave Halter
ab91cfa3b5 Fix: print_stmt was not actually cared for in Python 2.7, #662. 2015-12-15 13:08:37 +01:00
Dave Halter
7141158484 Merge master into linter. 2015-12-15 12:28:38 +01:00
Claude
1e6397b163 check 'assigned types'-support (comes out of the jedi-box), and add tests for that 2015-12-15 11:56:54 +01:00
Claude
35fda3823e test dynamic annotation and dynamic forward reference 2015-12-15 11:53:48 +01:00
Claude
1258875300 add test that jedi doesn't break in case of non-pep-0484 comments 2015-12-15 00:37:23 +01:00
Claude
3cef8b6d55 string-annotations should only be interpreted by the pep-0484 code, not the parser 2015-12-15 00:31:47 +01:00
Claude
626fa60d03 Revert "clean out the last_* fields of sys before importing it."
This reverts commit be399c81c3.
Will break python 2.6 (possibly 2.7) tests; this is expected behaviour.
See https://github.com/davidhalter/jedi/pull/661#discussion_r47543815
2015-12-14 22:37:20 +01:00
Claude
0f6fb23d91 override annotation() in Lambda, instead of checking in Function on type 2015-12-14 22:02:11 +01:00
Claude
6ce076f413 more elaborate tests 2015-12-14 12:10:48 +01:00
Claude
576fdf8106 better separation pep0484 code and py__annotation__() function 2015-12-14 12:10:00 +01:00
Dave Halter
c85426ebac More detailed testing for value-error-too-few-values. 2015-12-14 06:54:02 +01:00
Claude
be399c81c3 clean out the last_* fields of sys before importing it.
The system gets confused if there were uncaught errors in previous
tests without this. Particularly, it crashes (at least 2.6) if any tests during
test_integrations were skipped.
2015-12-14 00:52:36 +01:00
Claude
0f08dc6ac6 Addinf myself to AUTHORS 2015-12-14 00:03:07 +01:00
Claude
7f8b878c8c if both docstring and annotations are present, use both for function parameters 2015-12-13 23:55:07 +01:00
Claude
f8debace0d forward reference pep-0484 2015-12-13 23:47:45 +01:00
Claude
c61f39cb2b add test for annotations to test_parser_tree 2015-12-13 23:45:37 +01:00
Claude
7e8112d607 pep0484 return type support 2015-12-13 23:07:13 +01:00
Mathias Fussenegger
e0947a04eb don't fail on UnicodeDecodeError in buildout script detection
This fixes #650
2015-12-13 21:50:09 +01:00
Claude
68cbabe819 pep0484 tests only on python >= 3.2 2015-12-13 21:43:34 +01:00
Claude
c02668a443 Build in version-dependency in integration tests
If a line is encountered with the comment  or , then the tests are skipped if the current python version is less than the requested one. All tests until the end of the file, or a new comment specifying a compatibe python version are skipped
2015-12-13 21:42:45 +01:00
Claude
5a8c46d509 seperate parser and testing code 2015-12-13 21:13:20 +01:00
Claude
fadf4f4419 initial poc pep-0484 type hints 2015-12-13 18:05:57 +01:00
Dave Halter
7b8d4e86ac The evaluator recursion limitations are now reset in static analysis for each node, otherwise it's incredibly unprecise. 2015-12-13 17:18:19 +01:00
Dave Halter
106f6f7f5a too many values and too few values errors implemented for list comprehensions tuple unpacking. 2015-12-12 14:09:57 +01:00
Dave Halter
28585dcdba Better testing of classes. 2015-12-12 02:48:37 +01:00
Dave Halter
75ac2b9686 Enable better ways for analysis to analyze loop variables. 2015-12-11 20:25:49 +01:00
Dave Halter
8d3be10270 Fix issues in Python 2.7. 2015-12-10 17:20:21 +01:00
Dave Halter
a1410de9e8 Better description of the py__XXX__ attributes. 2015-12-10 16:53:08 +01:00
Dave Halter
1189868593 Use CheckAttribute descriptor more in CompiledObject to avoid duplicate code. 2015-12-10 16:43:42 +01:00
Dave Halter
5087584fdc evaluator is now used only as an attribute in CompiledObject. 2015-12-10 16:40:56 +01:00
Dave Halter
9e8da17688 Remove py__class__ evaluator param from representation objects. 2015-12-10 16:39:27 +01:00
Dave Halter
afb1d6c3b8 Remove evaluator param from py__call__. 2015-12-10 16:20:46 +01:00
Dave Halter
506d5a4f31 Remove evaluator param from py__bases__. 2015-12-10 16:16:30 +01:00
Dave Halter
98b1845784 Remove evaluator param from py__mro__. 2015-12-10 16:12:43 +01:00
Dave Halter
b16fd84628 Remove py__getattribute__. 2015-12-10 16:07:15 +01:00
Dave Halter
9bac88100a Get rid of get_exact_index_types. 2015-12-10 15:58:34 +01:00
Dave Halter
b10a048167 Get rid of Array.values() and Array.__iter__(). 2015-12-10 15:56:45 +01:00