mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Get some first extract_function stuff working
This commit is contained in:
20
test/refactor/extract_function.py
Normal file
20
test/refactor/extract_function.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -------------------------------------------------- in-module-1
|
||||
#? 11 text {'new_name': 'a'}
|
||||
test(100, (30 + b, c) + 1)
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 11 text {'new_name': 'a'}
|
||||
def a():
|
||||
return 30 + b
|
||||
|
||||
|
||||
test(100, (a(), c) + 1)
|
||||
# -------------------------------------------------- in-module-2
|
||||
#? 0 text {'new_name': 'ab'}
|
||||
100 + 1 * 2
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 0 text {'new_name': 'ab'}
|
||||
def ab():
|
||||
return 100 + 1 * 2
|
||||
|
||||
|
||||
ab()
|
||||
Reference in New Issue
Block a user