mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
36 lines
1015 B
Python
36 lines
1015 B
Python
# -------------------------------------------------- multi-equal
|
|
def test():
|
|
#? 4 error
|
|
a = b = 3
|
|
return test(100, a)
|
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Cannot inline a statement with multiple definitions
|
|
# -------------------------------------------------- simple
|
|
def test():
|
|
#? 4
|
|
a = (30 + b, c) + 1
|
|
return test(100, a)
|
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
--- /home/dave/source/jedi/test/refactor/inline.py
|
|
+++ /home/dave/source/jedi/test/refactor/inline.py
|
|
@@ -1,5 +1,4 @@
|
|
def test():
|
|
#? 4
|
|
- a = (30 + b, c) + 1
|
|
- return test(100, a)
|
|
+ return test(100, (30 + b, c) + 1)
|
|
# -------------------------------------------------- tuple
|
|
if 1:
|
|
#? 4
|
|
a = 1, 2
|
|
return test(100, a)
|
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
--- /home/dave/source/jedi/test/refactor/inline.py
|
|
+++ /home/dave/source/jedi/test/refactor/inline.py
|
|
@@ -1,5 +1,4 @@
|
|
if 1:
|
|
#? 4
|
|
- a = 1, 2
|
|
- return test(100, a)
|
|
+ return test(100, (1, 2))
|