spicysharkco
897cbff748
Fix extract_function when the extracted code defines no variable
...
If the extracted lines define no name, the new function ended with a
bare "return " and the call site became " = func(v1)". Both are
invalid Python.
Only add the final return line and the assignment when there is at
least one variable to return. Otherwise call the function as a
statement.
2026-10-18 02:07:55 +00:00
Dave Halter
a51f667be8
Cleanse the API from Python 2 stuff
2020-07-02 10:24:44 +02:00
Dave Halter
089a4713e3
Fix a small extract_variable issue, fixes #1611
2020-06-13 01:35:58 +02:00
Dave Halter
25973554e2
Remove the common folder and move it to a common file
2020-05-08 13:23:56 +02:00
Dave Halter
9d55194b92
Don't reuse a variable
2020-04-11 01:40:41 +02:00
Dave Halter
76ce422590
Make refactoring diff path a relative path to the project path
2020-02-28 00:17:14 +01:00
Dave Halter
3708ab3514
Make extract yield error message better
2020-02-27 01:12:34 +01:00
Dave Halter
c9334d140b
Make it impossible to extract if return is not at the end
2020-02-27 01:08:03 +01:00
Dave Halter
35e992c37c
Make sure that return at the end works properly for extract
2020-02-27 00:54:40 +01:00
Dave Halter
a92c28840b
Fix: Extract can now deal with return statements at the end
2020-02-26 09:31:33 +01:00
Dave Halter
bb6f0d5e91
Fix extract: better input filtering
2020-02-26 00:59:04 +01:00
Dave Halter
17892556f8
Fix another comment extraction issue
2020-02-26 00:17:44 +01:00
Dave Halter
b65c1c26aa
Fix a function extract indentation issue
2020-02-25 23:52:23 +01:00
Dave Halter
1f82efa86d
Fix a newline issue for refactoring functions
2020-02-25 23:27:21 +01:00
Dave Halter
94c00229f2
Make it possible to include comments for extract function
2020-02-25 23:25:50 +01:00
Dave Halter
5614ef2fed
Move all the extract stuff into a different file
2020-02-25 10:33:31 +01:00