Peter Law
f68d65ed59
Push much looping and merging of infering type vars into ValueSet
2020-03-22 15:29:11 +00:00
Peter Law
3c7621049c
Extract annotation inference onto annotation classes
...
This removes the _infer_type_vars util in favour of a polymorphic
implementation, removing the conditional checks on the type of
the annotation instance.
While for the moment this creates some circular imports, further
refactoring to follow should be able to remove those.
2020-03-22 15:29:11 +00:00
Peter Law
bc53dabce3
Make tuple generic parameters work
2020-02-23 13:59:44 +00: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
3ba68b5bc6
Properly convert compiled values to generic classes
2020-01-10 15:09:16 +01:00
Dave Halter
8611fcf8ea
Fix some tests
2019-12-27 11:59:40 +01:00
Dave Halter
51e2e90dce
Make sure overload checks work for TypeAlias, see #1416
2019-12-20 01:33:41 +01:00
Dave Halter
e656a5f18f
Make it possible to infer Callable TypeVars, fixes #1449
2019-12-12 23:46:55 +01:00
Dave Halter
28ecc2709a
Don't use globals anymore
2019-12-09 00:15:21 +01:00
Dave Halter
33224ae7e1
Remove a duplicate method
2019-12-09 00:11:51 +01:00
Dave Halter
5acbb06315
Refactor so typing uses BaseTypingValueWithGenerics
...
This makes it finally possible to use type vars with Callable and some other classes.
Fixes #1413
2019-12-08 23:50:57 +01:00
Dave Halter
9eef771ec5
Remove get_index_and_execute and use something else
2019-12-08 22:55:52 +01:00
Dave Halter
ad92882c48
Use the generics manager for all the typing classes
2019-12-08 22:42:01 +01:00
Dave Halter
c112858a1c
Move iter_over_arguments to a separate file
2019-12-08 20:14:15 +01:00
Dave Halter
deaa7265dd
value_of_index -> context_of_index
2019-12-08 20:09:53 +01:00
Dave Halter
aab0002950
Rename two classes to make some things clearer
2019-12-07 15:32:59 +01:00
Dave Halter
ddbb87fd1d
Make some lines shorter
2019-12-07 15:29:56 +01:00
Dave Halter
48ac0c9421
Move more stuff from gradual/typing.py to gradual/base.py
2019-12-07 15:27:14 +01:00
Dave Halter
37a9d1536c
Remove TypingName, it looks like it's not used
2019-12-07 15:12:27 +01:00
Dave Halter
3dbe5c10ae
Start splitting up gradual/typing.py
2019-12-07 15:11:50 +01:00
Dave Halter
4bd7c2e627
Remove a TODO that was implemented
2019-12-07 14:56:20 +01:00
Dave Halter
36b800f8d3
Make sure that Tuple autocompletes properly, fixes #1389
2019-12-05 18:55:33 +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
18ecb5a746
Small rename
2019-08-26 23:34:01 +02:00
Dave Halter
14fc5ed289
Fix more issues with where contexts are used and where values are used
2019-08-20 09:59:10 +02:00
Dave Halter
caee8e9952
Fix final gradual typing related issues
2019-08-19 19:43:45 +02:00
Dave Halter
b19ba12566
Fix some more context issues
2019-08-19 19:33:12 +02:00
Dave Halter
6fb49eaadf
as_context caching
2019-08-18 17:52:15 +02:00
Dave Halter
8e60689bcf
valueualized_node -> contextualized_node
2019-08-18 00:58:33 +02:00
Dave Halter
f61246bf13
Fix quite a few more tests. Only about a fifth failing now
2019-08-18 00:47:21 +02:00
Dave Halter
680388a7e8
More fixes
2019-08-17 17:01:21 +02:00
Dave Halter
2629ff55f3
Fix some array tests
2019-08-17 15:42:13 +02:00
Dave Halter
03920502c4
infer_state -> inference_state
2019-08-16 11:44:30 +02:00
Dave Halter
600272366f
parent_value -> parent_context
2019-08-15 09:36:46 +02:00
Dave Halter
9986d8c9aa
Context -> Value
2019-08-15 01:26:11 +02:00
Dave Halter
49f996867d
NO_CONTEXTS -> NO_VALUES
2019-08-15 01:24:28 +02:00
Dave Halter
ad4f546aca
context -> value
2019-08-15 01:23:06 +02:00
Dave Halter
9e23f4d67b
Move base_context -> base_value
2019-08-15 00:41:02 +02:00
Dave Halter
a5dff65142
Evaluator -> InferState
2019-08-15 00:37:51 +02:00
Dave Halter
8157d119a7
eval_ -> infer_
2019-08-15 00:20:01 +02:00
Dave Halter
3b4f292464
Move the evaluate package to inference
2019-08-15 00:14:26 +02:00