Dave Halter
30e702de11
Generics don't have signatures
2021-01-01 04:09:49 +01:00
Dave Halter
4f34712858
Fix signatures for TypeVar and cast, fixes #1709
2021-01-01 03:59:12 +01:00
Dave Halter
9d1587a41d
Don't need to inherit from object anymore
2020-07-26 00:11:57 +02:00
Dave Halter
9957565b37
Try to use yield from instead of yield, if possible
2020-07-19 13:34:58 +02:00
Dave Halter
a0de93a638
Remove super arguments
2020-07-02 10:59:59 +02:00
Dave Halter
5ab351dc8f
Remove unicode literals from code base
2020-07-02 10:43:14 +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
Dave Halter
364d33119c
Merge branch 'django'
2020-06-14 22:24:31 +02:00
Dave Halter
21f1df18b6
Fix some issues with sub class matching, fixes #1560
2020-06-14 18:10:00 +02:00
Dave Halter
df7dd026d2
Make it possible to use inheritance on generics without always specifying type vars, see also discussion in #1593
2020-06-10 09:54:32 +02:00
Dave Halter
a2108de2c0
Use py__get__ for Django Model.objects
...
This includes the fix in https://github.com/typeddjango/django-stubs/pull/394
2020-06-09 23:26:43 +02:00
Dave Halter
cd6113c2c3
Move with_generics and define_generics to ClassMixin
2020-06-08 00:11:45 +02:00
Dave Halter
574b790296
Make it possible to use inheritance on generics without always specifying type vars, see also discussion in #1593
2020-06-06 01:23:14 +02:00
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