mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
Finally get rid of call_of_leaf
This commit is contained in:
@@ -99,3 +99,14 @@ class Test():
|
||||
|
||||
#?
|
||||
isinstance(1, int())
|
||||
|
||||
# -----------------
|
||||
# more complicated arguments
|
||||
# -----------------
|
||||
|
||||
def ayyyyyye(obj):
|
||||
if isinstance(obj.obj, str):
|
||||
#?
|
||||
obj.obj
|
||||
#?
|
||||
obj
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
from textwrap import dedent
|
||||
|
||||
from jedi.inference import helpers
|
||||
|
||||
|
||||
def test_call_of_leaf_in_brackets(Script):
|
||||
s = dedent("""
|
||||
x = 1
|
||||
type(x)
|
||||
""")
|
||||
last_x = Script(s).names(references=True, definitions=False)[-1]
|
||||
name = last_x._name.tree_name
|
||||
|
||||
call = helpers.call_of_leaf(name)
|
||||
assert call == name
|
||||
Reference in New Issue
Block a user