mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Refactor execute_operation a bit
This commit is contained in:
@@ -300,6 +300,17 @@ some_dct['b']
|
||||
#? int() float() str()
|
||||
some_dct['c']
|
||||
|
||||
class Foo:
|
||||
pass
|
||||
|
||||
objects = {object(): 1, Foo: '', Foo(): 3.0}
|
||||
#? int() float() str()
|
||||
objects[Foo]
|
||||
#? int() float() str()
|
||||
objects[Foo()]
|
||||
#? int() float() str()
|
||||
objects['']
|
||||
|
||||
# -----------------
|
||||
# with variable as index
|
||||
# -----------------
|
||||
|
||||
@@ -56,6 +56,12 @@ a
|
||||
(3 ** 3)
|
||||
#? int() str()
|
||||
(3 ** 'a')
|
||||
#? int() str()
|
||||
(3 + 'a')
|
||||
#? bool()
|
||||
(3 == 'a')
|
||||
#? bool()
|
||||
(3 >= 'a')
|
||||
|
||||
class X():
|
||||
foo = 2
|
||||
|
||||
@@ -206,6 +206,7 @@ current_dirname = os.path.basename(dirname(dirname(dirname(__file__))))
|
||||
('example.py', '"test%scomp' % s, None, ['letion' + s]),
|
||||
('example.py', 'r"comp"', None, []),
|
||||
('example.py', 'r"tes"', None, []),
|
||||
('example.py', '1 + r"tes"', None, []),
|
||||
('example.py', 'r"tes"', 5, ['t' + s]),
|
||||
('example.py', 'r" tes"', 6, []),
|
||||
('test%sexample.py' % se, 'r"tes"', 5, ['t' + s]),
|
||||
|
||||
Reference in New Issue
Block a user