mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Fix power operation, fixes #1268
This commit is contained in:
@@ -84,7 +84,7 @@ def eval_node(context, element):
|
||||
had_await = True
|
||||
first_child = children.pop(0)
|
||||
|
||||
context_set = eval_atom(context, first_child)
|
||||
context_set = context.eval_node(first_child)
|
||||
for trailer in children:
|
||||
if trailer == '**': # has a power operation.
|
||||
right = context.eval_node(children[1])
|
||||
|
||||
@@ -57,6 +57,11 @@ a
|
||||
#? int() str()
|
||||
(3 ** 'a')
|
||||
|
||||
class X():
|
||||
foo = 2
|
||||
#? int()
|
||||
(X.foo ** 3)
|
||||
|
||||
# -----------------
|
||||
# assignments
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user