Dave Halter
582df2f76d
Fix the MixedContext and also use MixedModuleContext
2019-12-01 17:22:36 +01:00
Dave Halter
5c79472024
Separate CompiledModuleContext from CompiledContext, fixes #1428
2019-12-01 14:56:55 +01:00
Dave Halter
378712dbc1
Fix contextualizing of subscriptlist
2019-12-01 11:07:18 +01:00
Dave Halter
b13c4c446f
Fix a globals context issue, fixes #1435
2019-12-01 01:28:03 +01:00
Dave Halter
e81c241905
Remove Python 2 implicit relative imports feature
...
Python 2 is almost gone, so I don't support those old features anymore.
2019-12-01 00:45:08 +01:00
Dave Halter
c77f33b73b
A small rename of a value that is actually a context
2019-12-01 00:31:22 +01:00
Dave Halter
b895924311
Merge pull request #1451 from pappasam/FIX_SHOW_SYSTEM_FOLDERS
...
Fix: no longer shows folders recursively to root
2019-12-01 00:12:51 +01:00
Dave Halter
86071dda54
Use a different sys path for import completions and import type inference
...
Fix tests of the #1451 pull request
2019-12-01 00:12:19 +01:00
Sam Roeca
1ba83414a5
Change search strategy for adding parent paths:
...
1. skip dirs with __init__.py
2. Stop immediately when above self._path
2019-11-30 10:14:28 -05:00
Dave Halter
59c5b51c0d
Add __ne__ to BaseValueSet. Might have caused issues in Python 2, see #1442
2019-11-30 10:01:27 +01:00
Sam Roeca
c2fd7b3104
Fix: upward search omits unnecessary paths
...
In the previous implementation, Jedi's traverse_parents function
traversed parent directories to the system root every time. This would
inadvertently add every folder to the system root every time. Obviously,
this is not the behavior desired for the import system.
This commit collects directories in an upward search until we:
1. Hit any directory without an __init__.py, AND
2. Are above self._path.
2019-11-29 21:12:12 -05:00
Sam Roeca
4bc4f167e9
Revert "Fix: no longer shows folders recursively to root"
...
This reverts commit 03b4177d3d .
2019-11-29 20:11:23 -05:00
Dave Halter
3c68d3d341
Avoid finding submodules for compiled objects, because it's at least not implemented
2019-11-29 17:18:04 +01:00
Dave Halter
8478ad7ffb
Make sure that goto on a subscript colon doesn't crash
2019-11-29 17:10:07 +01:00
Dave Halter
98b592cb68
Fix getitem in compiled
...
This change just applies a change to CompiledObject that was done to values a long time ago
2019-11-29 16:14:17 +01:00
Dave Halter
c38e4fce70
Make sure py__get__ is defined on all values
...
Also define matches_signature on all signatures, there's definitely cases where that might be called
2019-11-29 15:04:04 +01:00
Dave Halter
6e5e706288
Fix file name completions when file name is too long
2019-11-29 14:11:31 +01:00
Dave Halter
0e92be66db
Fix an issue around completions in comments before strings
2019-11-29 13:44:12 +01:00
Sam Roeca
03b4177d3d
Fix: no longer shows folders recursively to root
...
In the previous implementation, Jedi would's traverse_parents function
traversed parent directories to the system root every time. This would
inadvertently add every folder to the system root every time. Obviously,
this is not the behavior desired for the import system.
This pull request provides a new argument to the traverse_parents
function, "root", which represents the root parent for the search. This
argument defaults to None, thereby preserving the existing behavior of
the function.
I chose to duplicate some code for performance reasons. Since I'm trying
to avoid too much path manipulation magic, we do:
* a search to a valid specified root, OR
* a simple upward search until hitting the system root when there is no
valid root specified.
2019-11-28 23:04:08 -05:00
Samuel Roeca
761f0828c7
Fix missing inference for typing.Type[typing.TypeVar] ( #1448 )
...
* Add Type[TypeVar] support
* Completion tests for typing.Type[typing.TypeVar]
2019-11-27 22:10:58 +01:00
Dave Halter
facd21afc6
Remove Python 3.9 dev build from travis, it's not needed
2019-11-27 20:50:29 +01:00
Dave Halter
e1d840c89b
Start to use Python 3.8 in the normal CI pipeline
2019-11-27 20:15:52 +01:00
Dave Halter
15c13c1386
Fix the pow test for Python 3.8
2019-11-27 20:12:50 +01:00
Jérome Perrin
6d632a01eb
Fix inference from type comment for function parameter with dot
...
fix for https://github.com/davidhalter/jedi/issues/1437
2019-11-08 13:41:17 +01:00
ANtlord
4b15c8459a
Merge branch 'master' of https://github.com/davidhalter/jedi
2019-10-28 08:52:56 +02:00
Endill
00b220516d
Fix annotation string generated from wrong object
2019-10-26 13:58:15 +02:00
Johannes Maria Frank
364a527fd9
Added missing sorted to scandir
2019-10-22 16:49:35 +01:00
Johannes Maria Frank
2039ab9a3c
Fixed pytest fixtures for test_api
2019-10-22 16:47:06 +01:00
Johannes Maria Frank
d48816603e
Sorted scandir results to have completions ordered
2019-10-22 16:34:47 +01:00
Johannes Maria Frank
f61d041830
Switched back to fuzzy off as default
2019-10-22 16:06:46 +01:00
Johannes Maria Frank
f7fae4dde7
Added file fuzzy match and refactored
2019-10-22 15:50:16 +01:00
ANtlord
893b695a61
Merge branch 'master' of https://github.com/davidhalter/jedi
2019-10-21 22:27:06 +03:00
Johannes Maria Frank
2653752f9c
Corrected formatting
2019-10-21 15:44:03 +01:00
Johannes Maria Frank
d73f32745d
Fixed bug for python 2
2019-10-10 15:02:00 +02:00
Johannes Maria Frank
1fa678e3fe
Corrected an error in the math fuzzy completion test
2019-10-10 13:23:33 +02:00
Johannes Maria Frank
a84087682d
Adopted results for different python versions
2019-10-10 12:10:19 +02:00
Johannes Maria Frank
48ffc5473a
Added test for math og
2019-10-09 10:37:46 +02:00
Johannes Maria Frank
0b56bf8f08
Added completions test with fuzzy=True
2019-10-04 17:18:01 +01:00
Johannes Maria Frank
85278242c3
Switched to fuzzy boolean
2019-10-02 00:28:31 +01:00
Dave Halter
6baa3ae8e1
Start working on uniting parts of code of file path/dict completion
2019-09-27 09:36:37 +02:00
Johannes Maria Frank
0bbc8d6e9a
Added match_method parameter
2019-09-26 09:12:15 +01:00
Johannes Maria Frank
8f306953da
Added experimental substring and fuzzysearch
2019-09-26 08:17:30 +01:00
Dave Halter
88ebb3e140
Get a few more tests passing about dict key strings
2019-09-23 21:05:01 +02:00
Dave Halter
954fd56fcc
Get some more dict completions working
2019-09-23 09:21:43 +02:00
Dave Halter
e8afb46cde
Get the first dict completions passing
2019-09-23 09:18:26 +02:00
Dave Halter
a6fcf779d4
Fix a small issue created in #1398
2019-09-21 23:29:07 +02:00
Levente Polyak
527ef6fcdd
fix static analysis test skips with latest pytest
...
Latest pytest ensures pytest.skip is being called with a str parameter.
However, test_static_analysis passed over the skip parameter which
contains a tuple returned from skip_python_version leading to test
regression.
Unify the version skip reasons for both, static analysis and integration
tests by using a shared BaseTestCase parent to avoid code duplication.
Furthermore handle test_static_analysis skip_reason extraction
orthogonal to test_completion.
2019-09-21 21:42:05 +02:00
Philipp A
a0f95fc89f
Fixed rST in changelog
2019-09-21 21:35:04 +02:00
Maxim Cournoyer
96d650cab3
test: test_completion: Dynamically resolve current directory name.
...
This fixes issue #1395 (see:
https://github.com/davidhalter/jedi/issues/1395 ).
* test/test_api/test_completion.py(current_dirname): New variable.
(test_file_path_completions): Use it.
2019-09-19 23:35:18 +02:00
ANtlord
659aaf6861
Naming corrections.
2019-09-19 08:42:39 +03:00