mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-04 21:48:47 +08:00
Quite a few fixes to be eventually able to use NameParts as Definition inputs.
This commit is contained in:
1 parent
1199defabb
commit
45e033c50e
4 files changed
+19
-15
No files matched your search
@@ -5,7 +5,7 @@ from jedi import Script
|
||||
|
||||
def get_definition_and_evaluator(source):
|
||||
d = Script(dedent(source)).goto_definitions()[0]
|
||||
return d._definition, d._evaluator
|
||||
return d._definition.parent.parent, d._evaluator
|
||||
|
||||
|
||||
def test_function_execution():
|
||||
|
||||
@@ -26,4 +26,4 @@ asdfasdf""" + "h"
|
||||
def test_tokenizer_with_string_literal_backslash():
|
||||
import jedi
|
||||
c = jedi.Script("statement = u'foo\\\n'; statement").goto_definitions()
|
||||
assert c[0]._definition.obj == 'foo'
|
||||
assert c[0]._definition.parent.parent.obj == 'foo'
|
||||
Reference in new issue
Block a user