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
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
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
Laurent Soest
fe50352f9c
annotations should be preferred even when it is a generator
2021-08-28 21:04:57 +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
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
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
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
Joseph Birkner
a340fe077e
Fixed ZIP completion.
2021-04-29 09:52:08 +02:00
Dave Halter
0eb6720c11
Some Python objects suck, fixes #1755
2021-02-26 21:58:47 +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
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
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
2ec3d72151
Use "namespace" as a Name.type
2021-01-02 12:14:28 +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
7d160f96f6
Do not show signatures for properties, fixes #1695
2021-01-01 23:51:41 +01:00
Dave Halter
1ccc63e83d
Make py__iter__ work as well for Interpreter
2021-01-01 17:58:31 +01:00
Dave Halter
971913be35
Make it possible to use __getitem__ in interpreter
2021-01-01 15:57:55 +01:00
Dave Halter
36ea6b3285
Change an import
2021-01-01 05:19:37 +01:00
Dave Halter
85f45771f1
Fix typing.NewType signature
2021-01-01 04:22:52 +01:00
Dave Halter
30e702de11
Generics don't have signatures
2021-01-01 04:09:49 +01:00
Dave Halter
778442a972
Type aliases should not have a signature
2021-01-01 03:59:28 +01:00
Dave Halter
4f34712858
Fix signatures for TypeVar and cast, fixes #1709
2021-01-01 03:59:12 +01:00
Dave Halter
92d96ac336
actually use auto_import_modules correctly
2021-01-01 02:59:42 +01:00
Dave Halter
c64e33173a
Fix an issue about properties, fixes #1705
2020-12-28 00:54:40 +01:00
Dave Halter
5d2aed34f4
Fix signatures if a decorator has no signatures, fixes #1705
2020-12-28 00:47:10 +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
8740ff2691
Ignore the mypy cache for searching folders
2020-12-25 17:35:28 +01:00
Dave Halter
b89f9445c2
Merge pull request #1684 from davidhalter/relative-import
...
Relative imports should work even if they are not within the project
2020-12-22 23:18:46 +01:00
Dave Halter
bc4f6ed9dd
Merge branch 'master' into relative-import
2020-12-12 12:15:13 +01:00
Leo Ryu
fd435a7bbb
Check if string_names is None before returning string_names ( #1708 )
...
* Check if string is None before using string_names
* Add test asserting None string_names returns an empty list
* Remove whitespace to pass flake8
* Add name to authors.txt
Co-authored-by: Leo Ryu <leo@episci.com >
2020-12-12 12:13:31 +01:00
Dave Halter
ce0ed4b8ae
Improve a comment
2020-12-10 16:57:09 +01:00
Dave Halter
42a759a7ae
Merge pull request #1706 from ColdGrub1384/master
...
Catch 'PermissionError' for unreadable directories
2020-12-07 22:34:03 +01:00
Matthias Bussonnier
4740178bdf
Not all nodes have children, protect agaisnt it.
2020-12-06 18:11:49 -08:00