1
0
forked from VimPlug/jedi
Commit Graph

42 Commits

Author SHA1 Message Date
Dave Halter 3104443212 Merge pull request #1579 from muffinmad/pseudotreenameclass
Return 'class' as _PseudoTreeNameClass.type (fix #1578)
2020-05-13 18:59:05 +02:00
muffinmad 7cd89cff6e Return 'class' as BaseName.type of _PseudoTreeNameClass (fix #1578) 2020-05-12 23:14:32 +03:00
Dave Halter e6e43413ff Any -> AnyClass 2020-05-10 03:17:52 +02:00
Dave Halter d0270b5e59 DefineGenericBase -> DefineGenericBaseClass 2020-05-10 03:07:40 +02:00
Dave Halter b57654aed3 Rename some classes to make it clearer that they are classes 2020-05-10 03:04:52 +02:00
Dave Halter 78ad06612e Remove an unused import 2020-05-10 03:00:47 +02:00
Dave Halter 434866558a Instances should not need get_generics 2020-05-10 02:59:54 +02:00
Dave Halter 42963a0e03 By having get_annotated_class_object for Tuple/Callable, some details are not necessary anymore 2020-05-10 02:52:42 +02:00
Dave Halter c2d1da09cb Make sure that Tuple/Callable instances have the correct py__class__ 2020-05-10 01:05:55 +02:00
Dave Halter f362932ec5 Return a more correct py__class__ for typing base objects 2020-05-09 16:28:05 +02:00
Dave Halter 2a227dcc7a Remove is_class_value from infer_type_vars 2020-05-08 17:49:02 +02:00
Peter Law 1c4a2edbdb Fix construction of nested generic tuple return types
Unfortunately this appears to show up a separate bug.
2020-04-18 19:43:47 +01:00
Dave Halter 61e9371849 Fix a potential AttributeError 2020-04-02 00:32:50 +02:00
Dave Halter ebb2786748 Avoid AttributeErrors for generics when a module is passed 2020-04-01 01:59:13 +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
Peter Law eac5ac8426 Update comment after refactor moved code 2020-03-25 22:35:12 +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 8000d425ec Don't use desc_with_module in integration tests 2020-03-21 01:47:00 +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 e56d4fde98 Improved Generic subclass matching 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 d9260bf78b More docstrings 2019-12-09 00:07:07 +01:00
Dave Halter a51dc54759 A bit better documentation 2019-12-09 00:02:44 +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 7319f8bf2c Make some more classes private for inference.gradual.base 2019-12-08 23:15:31 +01:00
Dave Halter d9ddaa31ae Use _create_instance_with_generics 2019-12-08 23:09:55 +01:00
Dave Halter 5874b0bd69 The generics manager is now part of DefineGenericBase 2019-12-08 23:03:15 +01:00
Dave Halter 9e6c53151b _InstanceWrapper to _GenericInstanceWrapper 2019-12-08 22:47:07 +01:00
Dave Halter 84d10657a3 Another rename for readability 2019-12-08 22:46:35 +01:00
Dave Halter 5c4b3da45d Merge GenericClass and _AbstractAnnotatedClass 2019-12-08 22:45:30 +01:00
Dave Halter 8213d183fb Start using generic managers, for #1413 2019-12-08 21:56:30 +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 72fc85f4c3 Try to prepare DefineGenericBase for a more general usage 2019-12-08 19:58:00 +01:00
Dave Halter df697cfb03 Make AbstractAnnotatedClass private 2019-12-08 19:00:26 +01:00
Dave Halter fd054d1add Move parts of AbstractAnnotatedClass to the new class DefineGenericBase 2019-12-08 18:58:28 +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 3dbe5c10ae Start splitting up gradual/typing.py 2019-12-07 15:11:50 +01:00