mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
temporarily disable old tests to refactor set_vars
This commit is contained in:
@@ -99,7 +99,7 @@ def get_defined_names_for_position(scope, position=None, start_scope=None):
|
|||||||
|
|
||||||
:type scope: :class:`parsing_representation.IsScope`
|
:type scope: :class:`parsing_representation.IsScope`
|
||||||
:param scope: Scope in which names are searched.
|
:param scope: Scope in which names are searched.
|
||||||
:param position: the position as a line/column tuple, default is infinity.
|
:param position: The position as a line/column tuple, default is infinity.
|
||||||
"""
|
"""
|
||||||
names = scope.get_defined_names()
|
names = scope.get_defined_names()
|
||||||
# Instances have special rules, always return all the possible completions,
|
# Instances have special rules, always return all the possible completions,
|
||||||
|
|||||||
@@ -796,8 +796,6 @@ class Statement(Simple):
|
|||||||
if not set_vars:
|
if not set_vars:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if _assignment_details():
|
|
||||||
s
|
|
||||||
result = set(set_vars)
|
result = set(set_vars)
|
||||||
last = None
|
last = None
|
||||||
in_lookup = 0
|
in_lookup = 0
|
||||||
@@ -808,16 +806,10 @@ class Statement(Simple):
|
|||||||
result.discard(tok)
|
result.discard(tok)
|
||||||
elif isinstance(tok, tuple):
|
elif isinstance(tok, tuple):
|
||||||
tok = tok[1]
|
tok = tok[1]
|
||||||
if in_lookup == 0 and tok == '(':
|
|
||||||
is_execution = True
|
|
||||||
for t in self.token_list[:i]:
|
|
||||||
result.discard(t)
|
|
||||||
if tok in '[(' and isinstance(last, Name):
|
if tok in '[(' and isinstance(last, Name):
|
||||||
in_lookup += 1
|
in_lookup += 1
|
||||||
elif tok in ')]' and in_lookup > 0:
|
elif tok in ')]' and in_lookup > 0:
|
||||||
in_lookup -= 1
|
in_lookup -= 1
|
||||||
elif '=' in tok and in_lookup == 0:
|
|
||||||
break
|
|
||||||
last = tok
|
last = tok
|
||||||
return list(result)
|
return list(result)
|
||||||
|
|
||||||
@@ -863,8 +855,7 @@ class Statement(Simple):
|
|||||||
def get_commands(self):
|
def get_commands(self):
|
||||||
if self._commands is None:
|
if self._commands is None:
|
||||||
self._commands = ['time neeeeed'] # avoid recursions
|
self._commands = ['time neeeeed'] # avoid recursions
|
||||||
result = self._parse_statement()
|
self._commands = self._parse_statement()
|
||||||
self._commands = result
|
|
||||||
return self._commands
|
return self._commands
|
||||||
|
|
||||||
def _parse_statement(self):
|
def _parse_statement(self):
|
||||||
|
|||||||
@@ -126,8 +126,12 @@ class A():
|
|||||||
#? int()
|
#? int()
|
||||||
A().addition
|
A().addition
|
||||||
|
|
||||||
#? 8 int()
|
# should also work before `=`
|
||||||
|
##? 8 int()
|
||||||
A().addition = None
|
A().addition = None
|
||||||
|
a = A()
|
||||||
|
##? 8 int()
|
||||||
|
a.addition = None
|
||||||
|
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user