4 Commits

Author SHA1 Message Date
WutingjiaX
09c0806c12 Merge e5749f83c9 into e53359ad88 2024-10-16 11:00:33 +00:00
wutingjia
e5749f83c9 typo 2024-10-16 11:38:04 +08:00
wutingjia
c962f4d720 filter imported names during completion 2024-10-16 11:19:37 +08:00
wutingjia
d2bef68018 filter imported names during completion 2024-10-15 20:15:58 +08:00
4 changed files with 2 additions and 12 deletions

View File

@@ -6,9 +6,6 @@ Changelog
Unreleased
++++++++++
0.19.2 (2024-11-10)
+++++++++++++++++++
- Python 3.13 support
0.19.1 (2023-10-02)

View File

@@ -27,7 +27,7 @@ ad
load
"""
__version__ = '0.19.2'
__version__ = '0.19.1'
from jedi.api import Script, Interpreter, set_debug_function, preload_module
from jedi import settings

View File

@@ -455,7 +455,6 @@ class Completion:
- Having some doctest code that starts with `>>>`
- Having backticks that doesn't have whitespace inside it
"""
def iter_relevant_lines(lines):
include_next_line = False
for l in code_lines:
@@ -684,11 +683,8 @@ def extract_imported_names(node):
imported_names = []
if node.type in ['import_as_names', 'dotted_as_names', 'import_as_name']:
for index, child in enumerate(node.children):
for child in node.children:
if child.type == 'name':
if (index > 0 and node.children[index - 1].type == "keyword"
and node.children[index - 1].value == "as"):
continue
imported_names.append(child.value)
elif child.type == 'import_as_name':
imported_names.extend(extract_imported_names(child))

View File

@@ -325,9 +325,6 @@ def test_duplicated_import(Script):
s = 'from os import path as pp, p'
assert 'path' not in import_names(s)
s = 'from os import chdir as path, p'
assert 'path' in import_names(s)
def test_path_issues(Script):
"""