Menu

#1196 extract method ignores decorators

open
nobody
5
2010-07-29
2010-07-29
rakslice
No

If I use the "extract method" refactoring on some code in a function with a decorator, with the option selected to insert the code before the current method (the
default), the refactoring puts the extracted function in between the decorator and its existing function instead of before the decorator.

Version: PyDev 1.6.0, Eclipse 3.5

Related things to think about:
- two or more decorators
- other things that might precede or follow a function, like docstrings, comments, etc.
- nested functions and inline functions

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.