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
Dave Halter
bb5bed4937
Merge pull request #1805 from kirat-singh/support_nested_namespace_packages
...
fix(import): support for nested namespace packages
2021-10-09 15:20:59 +02:00
Kirat Singh
d872eef1a7
chore: remove unnecessary for loop
2021-10-06 13:15:20 +00: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
Dave Halter
65bc1c117b
Merge pull request #1795 from frenzymadness/patch-1
...
inspect now raises OSError for objects without source file
2021-09-02 11:22:08 +02:00
Lumír 'Frenzy' Balhar
eab1b8be8b
inspect now raises OSError for objects without source file
...
CPython issue: https://bugs.python.org/issue44648
2021-09-01 20:50:54 +02:00
boerde
3cf98f6ba1
paramters with annotation do not need special pytest handling
2021-08-29 09:17:04 +02:00
boerde
8808b5b64b
added test to override fixture return value with annotation
2021-08-29 09:14:29 +02:00
Laurent Soest
fe50352f9c
annotations should be preferred even when it is a generator
2021-08-28 21:04:57 +02:00
Laurent Soest
96b4330ef9
testing: added test to override generator with annotation
2021-08-28 21:02:45 +02:00
Dave Halter
1d944943c3
Merge pull request #1794 from PeterJCLaw/fix-quoted-generic-forward-refs
...
Fix quoted generic annotations
2021-07-25 20:02:38 +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
Peter Law
6814a7336c
Hoist common variable for additional re-use
2021-07-25 15:23:51 +01:00
Dave Halter
070f191f55
Merge pull request #1663 from PeterJCLaw/tidyups
...
Tidyups
2021-07-25 13:44:55 +02:00
Dave Halter
11e67ed319
Merge pull request #1793 from PeterJCLaw/fix-functools-wraps-module-scope
...
Fix module-scope passthrough function signatures
2021-07-25 13:43:00 +02:00
Peter Law
ab2eb570a8
Use search_ancestor for a more robust search
2021-07-24 17:27:27 +01:00
Peter Law
aa265a44e1
Have all py__file__ methods return a Path
2021-07-24 17:14:25 +01:00
Peter Law
25a3e31ca8
Add a __repr__
2021-07-24 17:12:34 +01:00
Peter Law
87388ae00f
Drop dead line
2021-07-24 17:12:34 +01:00
Peter Law
2d11e02fdb
Remove redundant invalid documentation line
...
This is now replaced by the type signature.
2021-07-24 17:12:34 +01:00
Peter Law
392dcdf015
Fix potential bug passing exception to function excepting str
...
Found while adding type annotations.
2021-07-24 17:12:34 +01:00
Peter Law
b9fd84e11c
Add sanity-check exception
...
Found by mypy while adding types.
2021-07-24 17:12:34 +01:00
Peter Law
75624f0e3c
Convert more things to Python 3 idioms
2021-07-24 17:12:34 +01:00
Peter Law
6ad62e18d2
deque is in collections, not queue
...
Though it seems that the queue module does use it internally, which
is why this was working.
2021-07-24 17:12:34 +01:00
Peter Law
6787719c28
Ensure *args, **kwargs lookthrough works at module scope too
...
This means that passthrough signatures will be found for top level
functions, which is useful both where they're wrappered by
`functools.wraps` or not.
Fixes https://github.com/davidhalter/jedi/issues/1791 .
2021-07-24 16:58:34 +01:00
Peter Law
bb40390225
Add identifiers to these test strings
...
This makes it easier to work out which one fails when pytest
reports a failure. Mostly useful when introducing failing tests,
which I'm about to do.
2021-07-24 16:15:41 +01:00
Peter Law
0d15347210
Remove confusing comment
...
I'm assuming that this is incorrect given that there _are_ arguments
where the comment suggests there aren't any.
2021-07-24 16:14:20 +01:00
Dan Rosén
41652507b3
Fix grammar in features.rst
2021-05-06 00:38:19 +02:00
Dave Halter
41fb6a0cde
Merge pull request #1772 from josephbirkner/bugfix/zip-complete
...
Fixed ZIP import completion.
2021-04-29 23:56:14 +02:00
Joseph Birkner
a340fe077e
Fixed ZIP completion.
2021-04-29 09:52:08 +02:00
Dave Halter
dcea842ac2
Revert "Upgrade django-stubs, fixes #1750 "
...
This reverts commit ce5619cabb .
2021-02-26 23:09:22 +01:00
Dave Halter
ce5619cabb
Upgrade django-stubs, fixes #1750
2021-02-26 22:30:09 +01:00
Dave Halter
0eb6720c11
Some Python objects suck, fixes #1755
2021-02-26 21:58:47 +01:00
Dave Halter
ee30843f22
Merge pull request #1741 from sfavazza/master
...
BUGFIX: endless loop in pytest plugin
2021-02-01 00:41:40 +01:00
Samuele FAVAZZA
613cb08325
BUGFIX: prevent an infinite loop seeking for a "conftest.py" file
2021-01-30 16:31:26 +01:00
Aivar Annamaa
9f41153eb2
Allow tweaking Interpreter sys_path ( #1734 )
2021-01-23 14:38:10 +01:00
Dave Halter
387d73990b
Fix issues with getitem on compiled objects that have annotations, see #1719
2021-01-17 13:48:22 +01:00
Dave Halter
47d0318fa6
Paths are the default for modules
2021-01-14 02:00:14 +01:00
Dave Halter
7555dc0d45
Get rid of cast_path
2021-01-14 01:39:51 +01:00
Dave Halter
2a8b212af7
Move the module_injector
2021-01-14 01:35:18 +01:00
Dave Halter
837cb1106a
Use Path instead of str if possible
2021-01-14 01:32:57 +01:00
Dave Halter
b6fd81f1e1
Another time avoiding a memory leak, also part of #1723
2021-01-14 01:18:00 +01:00
Dave Halter
0ff532b937
Refactor docstrings
2021-01-14 01:11:50 +01:00
Dave Halter
b9067ccdbb
Avoid caching parso objects, fixes #1723
2021-01-14 00:29:34 +01:00
Dave Halter
44d77523b3
Fix a test that depended on correct cwd location an dnot having an x.py in a local directory
2021-01-10 16:31:37 +01:00
Dave Halter
6279791b24
Fix an issue with complete_search
2021-01-10 16:08:17 +01:00
Romain Rigaux
4597c7ebe7
Fix typo in docstring
2021-01-09 10:56:22 +01:00
Dave Halter
e6f18df1d2
unsafe -> not safe
2021-01-03 01:13:17 +01:00
Dave Halter
3428a24af0
Remove an outdated comment
2021-01-02 23:41:38 +01:00