Dave Halter
d16355fcf2
Fix tests in Python 2
2020-05-16 17:47:33 +02:00
Dave Halter
b3fc10a6e4
Magic methods fixes for reverse methods
2020-05-16 15:39:48 +02:00
Dave Halter
0db50b521d
Fix an issue with Tuple generics
2020-05-16 14:55:59 +02:00
Dave Halter
2fb072532a
Skip another non-important Python 2 test that fails on Windows
2020-05-16 01:25:15 +02:00
Dave Halter
384b2ad014
Fix an about dict completions
2020-05-16 00:46:46 +02:00
Dave Halter
41c146a6f3
Implement magic method return values, fixes #1577
2020-05-15 23:53:44 +02:00
Peter Law
43806f8668
Add support for generic optional parameters ( #1559 )
...
* Add support for generic optional parameters
* Tests for passing non-optional arguments to optional parameters
* Remove now-redundant is_class_value handling
This parameter has since been removed from infer_type_vars methods,
much simplifying the code.
2020-05-15 19:56:03 +02:00
Dave Halter
d4aa583e16
Fix inline case where a name was removed without the code being used, fixes #1582
2020-05-14 23:08:37 +02:00
Dave Halter
381fbeda6a
Make the diff nicer if there is no ending newline, fixes #1581
2020-05-14 00:20:20 +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
16e2b86bcf
Fix test
2020-05-13 01:18:47 +03:00
Dave Halter
0caee73975
Merge pull request #1572 from davidhalter/classvar
...
Remove is_class_value from infer_type_vars
2020-05-12 23:56:03 +02:00
Dave Halter
7f25e28d89
Fix tuple issue in 3.6
2020-05-12 23:33:06 +02:00
muffinmad
7ccee7d8fc
Add test _PseudoTreeNameClass.type == 'class'
2020-05-12 23:28:46 +03:00
Vlad Serebrennikov
e1c0d2c501
Reduce noise in signatures of compiled params ( #1564 )
...
* Remove "typing." prefix from compiled signature param
* Don't print default "None" for Optional params
* Don't remove 'typing.' prefix if symbol doesn't come from typing module
* Revert "Don't print default "None" for Optional params"
This reverts commit 8db334d9bb .
* Make sure "typing." doesn't appear in the middle
* Make sure only "typing." prefix is removed and not it's entries in the middle
* Use inspect.formatannotation() to create an annotation string
* Update AUTHORS.txt
* Add test for compiled param annotation string
* Replace Optional in test with other typing facilities
in order for test to be forward-compatible with 3.9
* Add an empty string fallback for Python 2
* Move _annotation_to_str back to original position
2020-05-10 13:33:36 +02:00
Dave Halter
6dbc5e783e
Fix argument clinic unpacking, remove dynamic bullshit
2020-05-10 13:27:20 +02:00
Dave Halter
bf4ec2282f
Fix getattr completions on very weird cases, fixes #1573
2020-05-10 11:37:58 +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
25973554e2
Remove the common folder and move it to a common file
2020-05-08 13:23:56 +02:00
Dave Halter
5fcbed721d
Merge pull request #1554 from PeterJCLaw/fix-nested-tuple-argument
...
Fix handling of nested tuple arguments
2020-05-08 12:49:44 +02:00
Dave Halter
d606ea6759
Correct a test
2020-04-27 09:59:38 +02:00
Dave Halter
8c7a883abd
Test that the actual signature of a function is used in Interpreter
2020-04-27 01:47:06 +02:00
Peter Law
17ca3a620f
Merge branch 'master' into fix-nested-tuple-argument
2020-04-26 13:56:14 +01:00
Peter Law
612fd23777
Support accessing the py__class__ of a NewType
...
The test here is a bit contrived, the actual place I found this
was in using a NewType as a type within a NamedTuple. However due
to https://github.com/davidhalter/jedi/issues/1560 that currently
also fails for other reasons. This still feels useful to fix on
its own though.
2020-04-26 00:59:07 +01:00
Dave Halter
dca505c884
Merge pull request #1553 from PeterJCLaw/generic-tuple-return
...
Fix construction of nested generic tuple return types
2020-04-26 01:28:51 +02:00
Dave Halter
7fd5c8af8f
Allow files for get_default_project, fixes #1552
2020-04-26 00:33:10 +02:00
Dave Halter
97fb95ec0c
Don't display unnecessary help, fixes #1557
2020-04-26 00:21:01 +02:00
Dave Halter
a3a147f028
Make sure that Django's values/values_list is tested (though not implemented
2020-04-25 22:55:29 +02:00
Dave Halter
c761dded35
Properly implement inheritance for Django models
2020-04-25 22:55:29 +02:00
Dave Halter
92623232c3
Make sure Django User inference works
2020-04-25 22:55:29 +02:00
Dave Halter
bf8b58aeeb
Some more django query tests
2020-04-25 22:55:29 +02:00
Dave Halter
f6803bce2c
Infer many to many fields
2020-04-25 22:55:29 +02:00
Dave Halter
6bff30fbbb
Include Django stubs as a third party repo
2020-04-25 22:55:29 +02:00
Dave Halter
6d927d502e
Make sure that infering the Django User model works
2020-04-25 22:55:29 +02:00
Dave Halter
2e1284f044
Fix a recursion error issue
2020-04-25 22:55:29 +02:00
Peter Law
df951733cd
Rename variable to placate mypy
2020-04-24 12:45:05 +01:00
Dave Halter
94d374c9ce
Fix a small issue with the help method, fixes #1556
2020-04-22 17:32:40 +02:00
Dave Halter
f3152a8c2b
Django is not supported for Python 2
2020-04-22 09:44:43 +02:00
Dave Halter
f3eaa418bb
Work with a NameWrapper, so Django goto works better
2020-04-22 09:32:39 +02:00
Dave Halter
f9176578ea
Fix another django modelfield issue
2020-04-22 00:54:43 +02:00
Dave Halter
7756792bba
Fix another issue with foreign keys
2020-04-22 00:33:51 +02:00
Dave Halter
ba4e3393d3
Fix ForeignKey issues with invalid values
2020-04-22 00:27:06 +02:00
Dave Halter
df307b8eda
Refactor a few things for django
2020-04-22 00:05:35 +02:00
Dave Halter
d96887b102
Remove old third party django tests
2020-04-21 23:43:59 +02:00
Dave Halter
086728365c
Make Django test optional
2020-04-21 23:36:00 +02:00
ANtlord
b5c1c6d414
Django plugin test of ManyToManyField is added and marked for future implementation.
2020-04-21 10:56:22 +03:00
ANtlord
df76b2462e
Review corrections.
2020-04-20 10:31:03 +03:00
Peter Law
cfa01d3ac5
Add handling of nested generic tuples
2020-04-19 14:10:03 +01:00
Peter Law
f8e7447d35
Add handling of nested generic callables
...
Previously tests for these were passing somewhat by accident,
however this commit's parent adds a case which showed that the
handling was missing.
Note that this also relies on the recent fix for nested tuples
which changed the `isinstance` check in `define_generics`.
2020-04-19 13:27:06 +01:00
Peter Law
2ac806e39f
Add test which demonstrates incomplete generic Callable handling
2020-04-19 13:25:02 +01:00