77 Commits
Author SHA1 Message Date
ClaudeandDave Halter a2b984ce24 also remove crashes with pep 448 unpacking of lists and sets 2018-09-23 21:00:11 +02:00
ClaudeandDave Halter 6bc79b4933 Fixed crash (and now recognises correctly) {**d, "b": "b"}["b"] 2018-09-23 21:00:11 +02:00
ClaudeandDave Halter b9127147e4 Recognize {**d} as a dict instead of set 2018-09-23 21:00:11 +02:00
Claude 5a555076bb update documentation add python 3.5 and PEP-0484 2016-02-16 10:04:06 +01:00
Claude 795a72a866 add typing.cast() to the todo list 2016-02-15 18:13:47 +01:00
Claude 4fe710d4d3 more tests 2016-02-15 18:02:11 +01:00
Claude 71ab855802 update list of things that are completed 2016-02-15 17:56:14 +01:00
Claude a9ebe71c64 add some tests to show that type-hints on the next line don't work 2016-02-15 17:54:20 +01:00
Claude 641fb80773 add support for 'with-assignment' hints 2016-02-15 17:52:21 +01:00
Claude 3a1b2e7104 add support for 'for-assignment' hints 2016-02-15 17:37:03 +01:00
Claude 8b28678d19 support tuple-assignment 2016-02-15 17:04:19 +01:00
Claude a658f7940c typehints for variables in comments 2016-02-15 16:03:23 +01:00
Claude daeee4ba0c simple typehints in comments 2016-02-15 15:12:07 +01:00
Claude ca08b8270b combine power-or-atom_expr statements into one statement 2016-02-15 10:20:25 +01:00
Claude d5f08f8bdd opting for skipping PEP492 backwards compatibility magic, instead directly making await and async keywords
See discussion at
https://github.com/davidhalter/jedi/pull/691#issuecomment-182815864
2016-02-11 19:30:01 +01:00
Claude 7077d0b762 Using python 3.7-like parser, instead of python 3.5 magic.
See https://github.com/davidhalter/jedi/pull/691#issuecomment-182815864
Revert "Update tokenizer to adhere to PEP492 magic"

This reverts commit 65187930bd.
2016-02-11 19:14:31 +01:00
Claude 3a36bb3a36 Seems necessary to explicitly specify python3.5: https://github.com/travis-ci/travis-ci/issues/4794 2016-02-10 17:46:56 +01:00
Claude 04524cd63c make travis test python3.5 as well 2016-02-10 13:06:27 +01:00
Claude 4249563eb2 tests can now also run on python 3.5 2016-02-09 21:08:47 +01:00
Claude 65187930bd Update tokenizer to adhere to PEP492 magic 2016-02-09 21:07:18 +01:00
Claude bf5acb4c7a once more: python 3.5 uses atom_expr node in many places where previous python would use power node 2016-02-09 19:34:44 +01:00
Claude 8819b2133a further fix for *-arguments in arglist 2016-02-09 18:23:24 +01:00
Claude a09611197b add ATEQUAL token for python < 3.5 2016-02-09 18:17:31 +01:00
Claude 0ed149070a add python 3.5 '@' operator to tokenizer 2016-02-09 17:13:25 +01:00
Claude de98cda2d7 python3.5 uses 'argument' node type, not 'arglist' for * and ** arguments 2016-02-09 17:12:26 +01:00
Claude 3b0dcb3fcb move file_input to top of file, as mentioned in 19acdd32b7 2016-02-09 11:47:01 +01:00
Claude 241abe9cf3 python 3.5 uses atom_expr node in many places where previous python would use power node 2016-02-09 11:42:53 +01:00
Claude 3fb5fe8c77 allow empty bodies for better autocompletion 2016-02-09 11:22:17 +01:00
Claude bc0486f723 python 3.5 uses atom_expr node in many places where previous python would use power node 2016-02-09 11:21:26 +01:00
Claude 1f4c95918f Add @= ATEQUAL token 2016-02-09 11:14:56 +01:00
Claude 079e3bbd28 use Ellipsis instead of ..., for python 2.7 compatibility 2016-01-23 23:09:45 +01:00
Claude 244c9976e5 cache the parsed jedi_typing module 2016-01-23 23:06:28 +01:00
Claude e267f63657 python 2.7 compatibility, typing module tested with docstring, so that it can also be tested in python 2.7 2016-01-23 22:53:48 +01:00
Claude c9bf521efd remove renaming of class based on parameters 2016-01-23 22:10:52 +01:00
Claude 442d948e32 I don't need the __len__ for __iter__ to work (eventually), so leaving it out for now 2016-01-17 18:04:59 +01:00
Claude 941da773f6 temporary fix for typing.Mapping[...].items(), can be removed after #683 is fixed 2016-01-17 17:05:31 +01:00
Claude b316fb94c4 enable tests for the value type in tuple assignment from typing.Mapping[].items() 2016-01-17 17:05:29 +01:00
Claude 885f7cb068 fix for iterators -- should start working when py__iter__ gets fixed: https://github.com/davidhalter/jedi/pull/663\#issuecomment-172317854 2016-01-17 16:53:09 +01:00
Claude b499906398 Reverted 10f5e1 --- needed some more work to get it working again 2016-01-17 16:12:43 +01:00
Claude ae701b2f9a Support for typing.Tuple[type, ...] 2016-01-17 12:43:23 +01:00
Claude a5fc149f9d use jedi.common.unite in flatten array of sets 2016-01-17 10:57:38 +01:00
Claude 59161c0b5d fix FakeSequence type 2016-01-17 10:51:06 +01:00
Claude 9d7e1ce81b add the typing module for testing 2016-01-17 10:41:41 +01:00
Claude 1b787e2a11 add test to check instanciated subclasses 2016-01-17 10:41:41 +01:00
Claude 409ee5568a test with different ways of importing the typing module 2016-01-17 10:41:41 +01:00
Claude 3852431549 typing.Union and typing.Optional 2016-01-17 10:41:41 +01:00
Claude 7b97312509 tuples and mappings in typing 2016-01-17 10:41:40 +01:00
Claude 10f5e15325 I feel this is a nicer solution. Forward Reference busting should be part of the annotation resolving. It doesn not have anything to do with the typing module (and should indeed also happen if someone writes his own types outside of the typing module) 2016-01-17 10:41:40 +01:00
Claude 5948c63cf9 Make the classes descriptions look better --- not sure whether this is a good idea 2016-01-17 10:41:40 +01:00
Claude 67cbc5ebd1 made code slightly more pytho2 friendly 2016-01-17 10:41:40 +01:00
Claude 90c4ca8c04 should obviously keep typing.py parsable in python 2 2016-01-17 10:41:40 +01:00
Claude e688a498ab Add sets and iterable/iterator 2016-01-17 10:41:40 +01:00
Claude 85023a22aa Not implemented classes should not default to everything 2016-01-17 10:41:40 +01:00
Claude cc6bd7d161 rework so that it also works withouty pep0484 type hints in jedi_typing.py 2016-01-17 10:41:40 +01:00
Claude 52cc721f45 made typing classes inheritable; added MutableSequence and List 2016-01-17 10:41:40 +01:00
Claude f5a31ad78e first try at the typing library 2016-01-17 10:41:40 +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
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
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
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