Dave Halter
f46f00bc71
Avoid wrong random call signature completion, fixes #1433
2019-12-03 22:12:33 +01:00
Dave Halter
6ffeea7eea
Make sure code_lines works on stubs, even if they are builtins
2019-12-01 19:10:08 +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
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
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
Dave Halter
4d332c32c0
Use create_name instead of duplicated logic
2019-09-05 00:04:24 +02:00
Dave Halter
47d6ae3da1
SimpleParamName -> AnonymousParamName
2019-09-04 01:20:44 +02:00
Dave Halter
a0cadd9375
Use Context.create_name instead of weird playing with params everywhere
2019-09-02 09:38:54 +02:00
Dave Halter
edb17b8e7c
Refactor params and what execution contexts need
2019-09-01 14:14:42 +02:00
Dave Halter
4572503c9f
Fix usages in context of the new parso parameter include_setitem=True
2019-08-28 22:56:16 +02:00
Dave Halter
c94bce315a
Merge branch 'refactoring'
2019-08-24 14:38:45 +02:00
Dave Halter
ec6fa0c97c
Differentiate between a public name and an internal string_name
2019-08-24 13:35:15 +02:00
Dave Halter
88cf198552
Avoid function executions if they are not necessary
...
This also means that annotations are prefered to docstring types
2019-08-24 12:23:33 +02:00
Dave Halter
6d361e03ac
Avoid import recursions in other ways
2019-08-24 02:06:57 +02:00
Dave Halter
60a73f6bac
Move get_global_filters to the context module
2019-08-23 21:19:17 +02:00
Dave Halter
7573e2033a
Fix comprehension parent issues, fixes #1215
2019-08-23 14:34:16 +02:00
Dave Halter
86f4f7be45
Remove a private access
2019-08-23 11:55:49 +02:00
Dave Halter
9f3a2f93c4
Remove get_statement_of_position. It's not used anymore
2019-08-23 00:13:18 +02:00
Dave Halter
193ba47f50
Simplify get_user_context
2019-08-23 00:10:56 +02:00
Dave Halter
05fe29a156
Get rid of the node_is_value parameter
2019-08-23 00:02:39 +02:00
Dave Halter
faf6752ff8
Move create_context to a context
2019-08-22 22:47:26 +02:00
Dave Halter
eee6810576
Small cleanup of code
2019-08-22 17:20:07 +02:00
Dave Halter
02c96b37db
Some more value -> context renames
2019-08-21 09:31:23 +02:00
Dave Halter
8a2b7f18cd
Get all tests working except usage tests
2019-08-21 00:50:34 +02:00
Dave Halter
85f8f2a764
Fix os path resolving issues
2019-08-21 00:22:34 +02:00
Dave Halter
14fc5ed289
Fix more issues with where contexts are used and where values are used
2019-08-20 09:59:10 +02:00
Dave Halter
39b294e085
Fix some interpreter issues
2019-08-20 09:09:19 +02:00
Dave Halter
0c419a5094
Fix class tests
2019-08-17 23:52:52 +02:00
Dave Halter
2629ff55f3
Fix some array tests
2019-08-17 15:42:13 +02:00
Dave Halter
c6d2aa6da2
Some small improvements
2019-08-16 16:44:03 +02:00
Dave Halter
165639c1dd
Start implementing the bulk of the context/value separation
2019-08-16 16:12:12 +02:00
Dave Halter
03920502c4
infer_state -> inference_state
2019-08-16 11:44:30 +02:00
Dave Halter
fffb39227e
InferState -> InferenceState
2019-08-16 11:43:21 +02:00
Dave Halter
600272366f
parent_value -> parent_context
2019-08-15 09:36:46 +02:00
Dave Halter
9986d8c9aa
Context -> Value
2019-08-15 01:26:11 +02:00
Dave Halter
49f996867d
NO_CONTEXTS -> NO_VALUES
2019-08-15 01:24:28 +02:00
Dave Halter
ad4f546aca
context -> value
2019-08-15 01:23:06 +02:00
Dave Halter
9e23f4d67b
Move base_context -> base_value
2019-08-15 00:41:02 +02:00
Dave Halter
a5dff65142
Evaluator -> InferState
2019-08-15 00:37:51 +02:00
Dave Halter
8157d119a7
eval_ -> infer_
2019-08-15 00:20:01 +02:00
Dave Halter
3b4f292464
Move the evaluate package to inference
2019-08-15 00:14:26 +02:00
Matthias Bussonnier
f47211c129
Use scandir on py3.5+ for less disk access on filename completion
...
On Python 3.5+, we can make use of scandir that not only list the
content of the directory as an iterator but caches some infomations (for
example, `is_dir()`; this avoid extra stats call to the underlying
filesytem and can be – according to pep 471 – 2x to 20 time faster
especially on NFS filesystem where stats call is expensive.
From a quick this is the only place where scandir would make sens, as
most other places only require the name.
Fixes 1381
2019-08-12 17:56:29 -07:00
Dave Halter
4619552589
Evaluation -> type inference
2019-08-13 01:29:50 +02:00
Dave Halter
467839a9ea
execute_evaluated -> execute_with_values
2019-08-13 01:29:50 +02:00
Matthias Bussonnier
ecca190462
Remove forgotten debug/print in filename completion. ( #1380 )
...
This is in the latest 0.15, and when forwarding path completions to
jedi, print a lot of stuff on the screen.
2019-08-12 12:37:21 +02:00