1
0
forked from VimPlug/jedi
Commit Graph

54 Commits

Author SHA1 Message Date
Dave Halter dde40b3a71 Add a comment to clarify the Type case 2020-04-02 00:23:38 +02:00
Dave Halter 28f256d2a6 Merge branch 'improve-type-annotation-inference-refactors' of https://github.com/PeterJCLaw/jedi 2020-04-01 00:54:25 +02:00
Dave Halter 883f5a3824 Merge branch 'improve-type-annotation-inference' of https://github.com/PeterJCLaw/jedi 2020-04-01 00:54:13 +02:00
Peter Law e2090772f3 Push tuple handling onto Tuple class
This resolves a TODO to avoid using a private method
2020-03-22 16:04:39 +00:00
Peter Law 525b88e9f1 Simplify early-exit code by having it once 2020-03-22 15:49:31 +00:00
Peter Law 3c90a84f68 Extract common get_generics() calls
These no longer need to be guarded by the conditions now that we
know these types are generic anyway.
2020-03-22 15:47:46 +00:00
Peter Law ea33db388b Remove dict merging where it doesn't do anything
These cases are all at the end of a single-path branch that ends
up "merging" against an empty mapping which is then returned
unchanged.
2020-03-22 15:45:18 +00:00
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
Dave Halter 656324f686 Disable some more tests for Python 2 2020-03-01 13:30:41 +01:00
Dave Halter 609737322d TypedDict checking should be at a later point 2020-03-01 02:34:38 +01:00
Peter Law bc53dabce3 Make tuple generic parameters work 2020-02-23 13:59:44 +00:00
Sam Roeca 9d2083fa08 Remove argument to filter.values()
Given 87161df2, values(from_instance=False) doesn't produce completions
anymore. Therefore, we remove from_instance as an argument.
2020-02-07 13:38:52 -05:00
Sam Roeca 6a9745b42b Get basic completions working with TypedDict 2020-02-07 13:24:00 -05:00
Dave Halter 87161df2f0 Make sure that typeddict py__getitem__ works 2020-02-07 16:45:03 +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 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