Dave Halter
a276710f66
Merge pull request #1820 from davidhalter/changes
...
Some Changes for 0.18.1
2021-11-17 01:42:55 +01:00
jerluc
b2e647d598
Removing invalid test for async with open(...)
...
See explanation in https://github.com/davidhalter/jedi/pull/1819#issuecomment-970776091
2021-11-16 16:12:43 -08:00
Dave Halter
84d086a47b
Fix an issue with whitespace after a dot at the end of a file, also part of #1748
2021-11-17 00:31:46 +01:00
Dave Halter
8bc9c8cda2
Fix an issue where a slice is indexed, fixes #1748
2021-11-17 00:14:59 +01:00
Dave Halter
42508d9309
Fix fixture annotations for pytest
...
This means mostly these:
@fixture
def foo() -> Generator[int, None, None]: ...
2021-11-16 22:57:25 +01:00
jerluc
8847848a03
Adds support for "async with" via #1818
2021-11-16 13:00:24 -08:00
Dave Halter
42c5276e04
Merge pull request #1800 from Boerde/pytest_improve_fixture_completion
...
Improve completion for pytest fixtures
2021-11-16 21:09:35 +01:00
Kirat Singh
53e837055f
fix(import): support for nested namespace packages
...
If multiple directories in sys.path provide a nested namespace
package, then jedi would only visit the first directory which
contained the package. Fix this by saving the remaining path list in
the ImplicitNamespaceValue and add a test for it.
2021-10-02 04:09:27 +00:00
boerde
8808b5b64b
added test to override fixture return value with annotation
2021-08-29 09:14:29 +02:00
Laurent Soest
96b4330ef9
testing: added test to override generator with annotation
2021-08-28 21:02:45 +02:00
Peter Law
78a95f4751
Handle generics appearing within any quoted annotations
...
This hoists the solution added for return-type annotations to
also apply for input annotations so they work too.
2021-07-25 16:31:27 +01:00
Peter Law
599a1c3ee1
Handle generics appearing within quoted return annotations
...
This ensures that these quoted likely forwards references in
return type annotations behave like their non-quoted equivalents.
I suspect there may be other places which will need similar
adjustments, which may mean that we should push the conversion
a layer closer to the parsing (perhaps in `py__annotations__`?).
One case I know that this doesn't solve (but which likely needs
similar adjustment) is generics in return types of comment-style
annotations. They're less likely and may not be worth supporting
since all supported Python versions can use the in-syntax spelling
for annotations at this point.
2021-07-25 15:32:22 +01:00
Dave Halter
c5fb2985a3
Use clearly defined project for tests to avoid scanning the 2000 typeshed files all the time
2021-01-02 15:31:57 +01:00
Dave Halter
55c7e4eb49
Stdlib modules should not be included in the get_references search, fixes davidhalter/jedi-vim#792
2021-01-02 00:58:50 +01:00
Dave Halter
d821451a64
Upgrade typeshed
2021-01-01 03:18:49 +01:00
Dave Halter
04c1c0f871
Fix an issue with api_name of class attributes, fixes #1688
2020-12-28 00:29:30 +01:00
Dave Halter
0f128c6deb
Fix nested comprehension contexts, fixes #1691
2020-12-27 21:09:00 +01:00
Dave Halter
98d0a55a02
Add a few more tests for annotations on self
2020-10-23 23:32:28 +02:00
Dave Halter
6eabde1519
Fix annotations on self attributes, fixes #1681
2020-10-23 23:26:07 +02:00
Dave Halter
58ef6cd36b
if_stmt test clauses should be resolved at the start of the if_stmt
2020-08-05 23:55:46 +02:00
Dave Halter
abf63d73d3
Basic implementation support for namedexpr, fixes #1647
2020-08-05 23:55:46 +02:00
Dave Halter
1ece7698c2
Merge branch 'master' into python3
2020-07-17 16:07:54 +02:00
Dave Halter
e4987b3e7a
Fix issues with generators, fixes #1624
2020-07-17 15:57:32 +02:00
Dave Halter
0790f376ca
Some Python 2 removals
2020-07-02 03:34:44 +02:00
Dave Halter
17343bb57c
Remove some more Python 3.5 references
2020-07-02 02:18:16 +02:00
Dave Halter
23db298e2f
Removed various 3.3/3.4/3.5 references
2020-07-02 00:34:27 +02:00
Dave Halter
7e295d05a1
Remove some more Python 2/3.5 references
2020-07-02 00:25:00 +02:00
Dave Halter
50b85153ce
Remove a lot of test references to Python 2/3.5
2020-07-02 00:17:21 +02:00
Peter Law
5184d0cb9c
Support passing values through decorators from factories
...
This builds on the approach taken in https://github.com/davidhalter/jedi/pull/1613
but applies it to type vars themselves so that their type var
nature is preserved when a function returns Callable[[T], T] and
the T has an upper bound.
2020-06-26 11:22:19 +01:00
Peter Law
2d0258db1a
Add tests for class-style decorator factories
2020-06-26 11:19:51 +01: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
1872ad311b
Fix decorator param completion
2020-06-15 00:34:55 +02:00
Dave Halter
364d33119c
Merge branch 'django'
2020-06-14 22:24:31 +02:00
Dave Halter
4ab35cac7b
Merge branch 'master' of github.com:davidhalter/jedi
2020-06-14 18:11:50 +02:00
Dave Halter
21f1df18b6
Fix some issues with sub class matching, fixes #1560
2020-06-14 18:10:00 +02:00
Peter Law
4f11f20e1d
Add a signature check for decorated functions
...
Specifically where the decorator is type annotated.
2020-06-14 16:24:42 +01:00
Peter Law
1f082b69d2
Handle passing functions and classes through a TypeVar
...
This fixes #1425 and #1607 by persisting the original underlying
function or class when we process a TypeVar they are passed into.
2020-06-13 23:28:20 +01:00
Dave Halter
9de5ab2037
Make it possible to complete on QuerySet methods, fixes #1587
2020-06-13 20:55:37 +02:00
Dave Halter
3415ccbb73
Add support for Django signatures, fixes parts of #1587
2020-06-13 16:18:47 +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
9adcf3d233
Make sure meta class filters can distinguish between classes and instances
2020-06-07 14:54:26 +02:00
Dave Halter
105c097fea
Merge branch 'django-custom-object-manager' of https://github.com/PeterJCLaw/jedi into django
2020-06-06 01:24:24 +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
Peter Law
c62cbd6654
Explicitly handle a not in b operator comparison
...
This avoids a `KeyError` from operator_to_magic_method lookup for
this case. Jedi probably could check for `__contains__` here, however
as it doesn't do so for `in` checks I'm following that lead for now.
Fixes https://github.com/davidhalter/jedi/issues/1594 .
2020-05-23 12:49:53 +01:00
Peter Law
c36904d983
Support custom managers in Django models
...
For the moment this support is limited to just Model.objects
replacements and does not use the custom manager for ForeignKey
related managers.
2020-05-22 12:33:03 +01:00
Peter Law
669b70b2cd
Validate instance methods on Django models
2020-05-22 12:32:14 +01:00
Peter Law
b7cdec427e
Support OneToOneFields
2020-05-18 22:19:20 +01:00
Peter Law
df66b35444
Support UUIDFields
2020-05-18 22:11:31 +01:00
Peter Law
cd9f2f31ea
Support URLFields
2020-05-18 22:10:48 +01:00