mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
- ability to inline single/all invocations and keep/remove the declaration - handled name conflicts of local and imported vars/functions - cases when this refactoring is not applicable can be found in PyInlineFunctionHandler (cherry picked from commit 40e298ba2b833a4408ee774628b84fe422468b91) GitOrigin-RevId: dd3fab59800163b4f300b410cd28a62c1ee1b6f3
37 lines
407 B
Python
37 lines
407 B
Python
def foo(arg):
|
|
local = 1
|
|
if arg:
|
|
another = 2
|
|
else:
|
|
another = 3
|
|
return local
|
|
|
|
|
|
def bar():
|
|
x = 1
|
|
local = 1
|
|
if x:
|
|
another = 2
|
|
else:
|
|
another = 3
|
|
res = local
|
|
|
|
|
|
def baz():
|
|
y = 2
|
|
local = 1
|
|
if y:
|
|
another = 2
|
|
else:
|
|
another = 3
|
|
res = local
|
|
|
|
|
|
z = 1
|
|
local = 1
|
|
if z:
|
|
another = 2
|
|
else:
|
|
another = 3
|
|
res = local
|