Commit Graph

54 Commits

Author SHA1 Message Date
Dave Halter
8f15f38949 Revert a change for Python 2.7 compatibility (see also e267f63657) 2021-12-25 14:08:44 +01:00
Dave Halter
50b85153ce Remove a lot of test references to Python 2/3.5 2020-07-02 00:17:21 +02:00
Dave Halter
a3410f124a Make sure that Callables are properly represented
See also comment of https://github.com/davidhalter/jedi/pull/1614#issuecomment-647054740
2020-06-21 01:31:58 +02:00
Peter Law
612fd23777 Support accessing the py__class__ of a NewType
The test here is a bit contrived, the actual place I found this
was in using a NewType as a type within a NamedTuple. However due
to https://github.com/davidhalter/jedi/issues/1560 that currently
also fails for other reasons. This still feels useful to fix on
its own though.
2020-04-26 00:59:07 +01:00
Dave Halter
4c964ae655 Fix some test results 2020-03-21 01:52:56 +01:00
Dave Halter
10bc578bfe Merge branch 'master' into refactor 2020-03-13 23:53:09 +01:00
Dave Halter
609737322d TypedDict checking should be at a later point 2020-03-01 02:34:38 +01:00
Dave Halter
fa63c92cf7 Simplify tests a bit 2020-03-01 01:56:49 +01:00
Dave Halter
a892887b04 Remove Python 3.4 support 2020-02-27 02:04:03 +01:00
Sam Roeca
d6f6c29a63 TypedDict test: fix Bar inheritance checks
Note: foo is defined as a function a the module level so I remove it
from consideration here to avoid complicating this test with other tests
in the module.
2020-02-13 10:43:41 -05:00
Sam Roeca
ac47866c4c TypedDict: fix non-inheritance tests, add inheritance
Note: tests currently failing
2020-02-11 18:32:15 -05:00
Sam Roeca
cf954bf006 Expand on TypedDict tests.
Adds a function that takes the TypedDict as an argument.

Note: the last two tests are failing, along with lots of other tests
throughout the system.
2020-02-07 14:40:39 -05:00
Dave Halter
87161df2f0 Make sure that typeddict py__getitem__ works 2020-02-07 16:45:03 +01:00
Dave Halter
7ef07b576f Merge branch 'master' into typeddict 2020-02-07 04:03:27 +01:00
Dave Halter
a49c757b8a Make Ellipsis without list in Callable work, fixes #1475 2020-02-03 09:25:46 +01:00
Dave Halter
8eb980db73 Create the basics to work with TypedDict in the future 2020-01-26 19:25:23 +01:00
Dave Halter
095f1295af Avoid a bug that a compiler might have found, fixes #1469 2020-01-11 21:35:39 +01:00
Dave Halter
e656a5f18f Make it possible to infer Callable TypeVars, fixes #1449 2019-12-12 23:46:55 +01:00
Dave Halter
46982ce42b Add a test to show that type var inference also works for tuples 2019-12-09 00:26:18 +01:00
Dave Halter
ab8f0ba834 Make sure Callable TypeVars are better identified, solves a part of #1413 2019-12-07 15:02:41 +01:00
Dave Halter
36b800f8d3 Make sure that Tuple autocompletes properly, fixes #1389 2019-12-05 18:55:33 +01:00
Dave Halter
7254bec92c Upgrade typeshed to the latest commits
Also fixes some small Jedi issues with it (None interpretation in annoations mostly)
2019-12-02 10:14:59 +01:00
Samuel Roeca
761f0828c7 Fix missing inference for typing.Type[typing.TypeVar] (#1448)
* Add Type[TypeVar] support
* Completion tests for typing.Type[typing.TypeVar]
2019-11-27 22:10:58 +01:00
Dave Halter
7bdd71f9a7 Add some dynamic inference checks for annotations 2019-09-03 00:56:42 +02:00
mwchase
925fc89447 Get typing.NewType working (#1344)
Squashed from the following commits:

* Update pep0484.py

(I don't think I want to know why the cursor jumped to the beginning of the line with every keystroke in GitHub's online editor. Change was entered backwards.)

* Added test for inline use of NewType. Currently assuming that wrapped instances should get the underlying type.

* Altered tests per https://github.com/davidhalter/jedi/issues/1015#issuecomment-356131566

* Add NewTypeFunction to typing evaluation module

* Update AUTHORS.txt

* Add a new test, and a speculative justification

For now, address only the second comment

* Copy code from third comment on the PR

From inspection, I *believe* I understand what this code is doing, and as such, I believe this should cause the new test I added in response to the second comment to fail, because that test is based on faulty assumptions.

* Explicitly discard the key from the tuple

* Update pep0484_typing.py

* Test for the wrapped type, not the wrapper "type"

* Change the return value from calling a NewType
2019-07-01 22:42:59 -07:00
Dave Halter
1e3b6a201d Fix filters for classes and functions 2019-07-01 22:24:29 -07:00
Dave Halter
a9ff58683e Fix ClassVar filter for instances 2019-06-26 22:56:30 +02:00
Dave Halter
5fa8338886 Enable a test that is kind of xfailing 2019-05-28 01:55:22 +02:00
Dave Halter
ec7b6b8d80 Fix stub function inferrals 2019-05-28 01:51:37 +02:00
Dave Halter
5a6d8ba010 Implement typing.cast 2019-05-27 20:59:04 +02:00
Dave Halter
2c5e2609f3 Overloaded functions now return values even if nothing matches 2018-12-09 12:43:55 +01:00
Dave Halter
2ec503d6eb Change some TypeVar base classes 2018-08-30 10:15:43 +02:00
Dave Halter
7fc311bb3e Add tests for classes that have generics not defined 2018-08-30 01:46:48 +02:00
Dave Halter
5979b93a7a Tests for Type[] 2018-08-30 01:38:14 +02:00
Dave Halter
ac6b7ff14e Fix type var completions so that there's at least no error 2018-08-30 01:23:28 +02:00
Dave Halter
80ab4d8ff5 Add tests for typing.TYPE_CHECKING 2018-08-30 01:14:48 +02:00
Dave Halter
bf6974dabb Fix an issue with a type var lookups 2018-08-30 01:10:51 +02:00
Dave Halter
28a55386b6 Add some more tests about mappings 2018-08-30 00:59:10 +02:00
Dave Halter
1fce0b45f4 Fix subscriptlist unpacking in Generics 2018-08-30 00:52:22 +02:00
Dave Halter
0edfe86d8b Fix Tuple support 2018-08-29 10:18:58 +02:00
Dave Halter
1a5710f140 Do a bit better class matching, it's not good yet, but we'll get there. 2018-08-28 23:28:58 +02:00
Hugo
7c9f24a18e Drop support for EOL Python 3.3 (#1019) 2018-08-04 00:40:00 +02:00
Tarcisio Eduardo Moreira Crocomo
e96ebbe88f Add tests for DefaultDict support. 2018-06-17 11:28:12 +02:00
Hugo
7c31ea9042 Drop support for EOL Python 2.6 2018-01-07 10:40:05 +02:00
Dave Halter
257009d238 Skip pep0484 tests when using Python 2.6. 2016-01-26 15:59:27 -02: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
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
ae701b2f9a Support for typing.Tuple[type, ...] 2016-01-17 12:43:23 +01:00
Claude
1b787e2a11 add test to check instanciated subclasses 2016-01-17 10:41:41 +01:00