mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Small fixes to make the tests pass again.
This commit is contained in:
@@ -86,8 +86,6 @@ def annotation_forward_reference(b: "B") -> "B":
|
|||||||
#? B()
|
#? B()
|
||||||
b
|
b
|
||||||
|
|
||||||
#? B()
|
|
||||||
annotation_forward_reference(1)
|
|
||||||
#? ["test_element"]
|
#? ["test_element"]
|
||||||
annotation_forward_reference(1).t
|
annotation_forward_reference(1).t
|
||||||
|
|
||||||
@@ -95,6 +93,9 @@ class B:
|
|||||||
test_element = 1
|
test_element = 1
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
#? B()
|
||||||
|
annotation_forward_reference(1)
|
||||||
|
|
||||||
|
|
||||||
class SelfReference:
|
class SelfReference:
|
||||||
test_element = 1
|
test_element = 1
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ class IntegrationTestCase(object):
|
|||||||
def definition(correct, correct_start, path):
|
def definition(correct, correct_start, path):
|
||||||
should_be = set()
|
should_be = set()
|
||||||
for match in re.finditer('(?:[^ ]+)', correct):
|
for match in re.finditer('(?:[^ ]+)', correct):
|
||||||
parser = Parser(load_grammar(), match.string, start_symbol='eval_input')
|
string = match.group(0)
|
||||||
|
parser = Parser(load_grammar(), string, start_symbol='eval_input')
|
||||||
parser.position_modifier.line = self.line_nr
|
parser.position_modifier.line = self.line_nr
|
||||||
element = parser.get_parsed_node()
|
element = parser.get_parsed_node()
|
||||||
element.parent = script._parser.user_scope()
|
element.parent = script._parser.user_scope()
|
||||||
|
|||||||
Reference in New Issue
Block a user