Peter Law
5ca69458d4
Add testing for mismatch cases
...
This should help catch any errors in our handling of invalid cases.
While some of these produce outputs which aren't correct, what
we're checking here is that we don't _error_ while producing that
output.
Also fix a case which this showed up.
2020-03-22 15:10:43 +00:00
Peter Law
0a7820f6de
Add many test cases
...
While these definitely _ought_ to work on Python 2.7, the annotation
support there is very limited and as Python 2 is deprecated it
doesn't seem worth it.
2020-02-23 13:58:10 +00:00
Lior Goldberg
1874e9be81
Remove the word 'class' from annotation_string
...
Currently, 'foo(x: int)' results with annotation_string="<class 'int'>".
Change this to 'int'.
2020-02-20 09:35:01 +01:00
Dave Halter
3388a9659b
Catch an error with illegal class instances, fixes #1491
2020-02-03 22:27:48 +01:00
Dave Halter
3ad3dc08b8
Run get_type_hint tests only for 3.6+
2020-02-03 01:03:19 +01:00
Dave Halter
eee919174d
Stubs should not become stubs again in the conversion function, fixes #1475
2020-02-03 00:58:54 +01:00
Dave Halter
e3c4b5b77e
Make sure param hints are working for functions
2020-02-02 18:42:01 +01:00
Dave Halter
4c7179bc87
Generate type hints, fixes #987
2020-02-02 16:55:10 +01:00
Dave Halter
bec87f7ff8
Jedi understand now when you use del, fixes #313
2020-01-26 20:07:56 +01:00
Dave Halter
18f84d3af7
Remove Python 3.3 from environment tests
2020-01-26 01:30:31 +01:00
Dave Halter
feefd47ddd
Fix an issue with names
2020-01-25 18:48:52 +01:00
Dave Halter
9c0efd5a67
Prepare a test for #1479
2020-01-25 01:07:20 +01:00
Dave Halter
3f6a718c34
Skip a test in Python 2
2020-01-24 14:08:18 +01:00
Dave Halter
e3e6727a2d
Make sure that the builtin docstring works again for infer calls
2020-01-24 12:49:39 +01:00
Dave Halter
b985a380bc
Fix a bug with version_info, fixes #1477
2020-01-24 11:04:50 +01:00
Dave Halter
dbdd556a2b
Add follow_imports to Definition.goto, fixes #1474
2020-01-22 18:29:02 +01:00
Dave Halter
59e7bacfae
Make sure a certain test passes as well with tox
2020-01-22 01:29:56 +01:00
Dave Halter
bff6e95e28
Rename Script.names to Script.get_names, fixes #1476
2020-01-22 01:22:46 +01:00
Dave Halter
8cc836e816
find_signatures -> get_signatures, see #1476
2020-01-22 01:10:38 +01:00
Dave Halter
58f54d8391
find_references -> get_references, see #1476
2020-01-22 01:06:37 +01:00
Dave Halter
9d7858eb3a
Fix remaining tests
2020-01-22 00:36:30 +01:00
Dave Halter
11a12d6ca8
Refactor execute_operation a bit
2020-01-12 13:01:08 +01:00
Dave Halter
c79269b3ee
Move another test to examples
2020-01-12 00:09:48 +01:00
Dave Halter
1e27491545
Remove unused test code
2020-01-12 00:07:27 +01:00
Dave Halter
4f56ec5daf
Make sure the latest changes work with Python 3.6/3.7
2020-01-10 15:14:22 +01:00
Dave Halter
3ba68b5bc6
Properly convert compiled values to generic classes
2020-01-10 15:09:16 +01:00
Dave Halter
cac73f2d44
Make Union/Optional works with compiled objects
2020-01-10 13:34:10 +01:00
Dave Halter
ba7776c0d9
Make sure that CompiledValue can deal with string annotations
...
Fixes #952
Inspired by #1461
2020-01-10 12:40:24 +01:00
Dave Halter
072d506302
Avoid a few warnings
2020-01-10 11:59:11 +01:00
Dave Halter
9b9cacfbf9
Make sure to use _stub_to_python_value_set for all conversions, see #1466
2020-01-07 01:27:50 +01:00
Dave Halter
5da9f9facd
Add a test to check if numpy tensorflow stuff is now cached, see #1116
2020-01-05 18:29:02 +01:00
Dave Halter
cc1664c69a
Avoid using params in tests and use get_signatures().params
2020-01-05 02:09:22 +01:00
Dave Halter
a7415be0ea
Make sure params have no name
2020-01-05 01:55:29 +01:00
Dave Halter
aca2a5a409
Undo finding signatures for everything and only do it for stubs and non-statements for when used in docstrings
2020-01-04 16:00:07 +01:00
Dave Halter
3b6bbab556
Infer doctests and signatures uniformly, fixes #1466
2020-01-03 00:45:14 +01:00
Dave Halter
04a738c014
Remove unnecessary code
2020-01-01 23:11:02 +01:00
Dave Halter
0a53ce5136
Separate getting docstrings and getting signatures for names, see discussion #1466
2020-01-01 23:05:06 +01:00
Dave Halter
54bd0b437f
Make sure that equals will only be added to keyword arguments and not just randomly
2020-01-01 19:00:17 +01:00
Dave Halter
9dc18054ee
Make some test code prettier
2020-01-01 17:36:42 +01:00
Dave Halter
1cc8f96f26
Add some more dict completion tests with whitespace
2020-01-01 17:14:11 +01:00
Dave Halter
ce748e6dc7
Skip dict key completion tests for Python 3.5, because it's just annoying with all the f-string stuff
2020-01-01 13:13:10 +01:00
Dave Halter
8914bbbcc3
Fix tests, skip more Python 2
2019-12-31 22:43:32 +01:00
Dave Halter
5853c67906
Write tests for dict getitem
2019-12-31 18:53:35 +01:00
Dave Halter
83ce8b1162
Make the completions possible for Interpreter objects
2019-12-31 18:34:50 +01:00
Dave Halter
b7a8929905
Add a few more tests for dict completions
2019-12-31 11:23:54 +01:00
Dave Halter
ca13c44788
Make sure to avoid duplicates in completions
2019-12-31 11:16:11 +01:00
Dave Halter
94a97ff8e8
Fix remaining issues with dict completions
2019-12-30 22:59:01 +01:00
Dave Halter
46ac4371df
Make most dict completions possible
2019-12-30 14:15:32 +01:00
Dave Halter
9fa4811425
Get dict completions mostly working
2019-12-30 03:34:18 +01:00
Dave Halter
7e769b87f3
Fix some more dict tests
2019-12-30 00:29:55 +01:00