[Eric] Refactor by renaming a package

Tony Arnold tony.arnold at manchester.ac.uk
Sun Nov 10 11:57:19 GMT 2019


Hi Detlev,

On Sun, 2019-11-10 at 10:40 +0100, Detlev Offenbach wrote:
> Hi Tony,
> 
> that is a little bit tricky but possible. Here are the steps.
> 
> 1. Open the __init__.py file of the package to be renamed.
> 2. Select "Rename Current Module" from the Refactoring menu
> 3. Enter the new package name into the dialog (instead of the
> prefilled 
> __init__.py)
> 4. Preview or Apply the refactoring
> 
> I just exercised this over here and it worked. The rope rename
> refactoring is 
> written such, that if the __init__.py file is to be renamed, it
> renames the 
> package instead.

That kind of worked. Had to fix up my forms manually though as I had
some promoted classes in there.

Thanks for the tip. Should prove useful.

Regards,
Tony.
-- 
Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT Services | G64, Kilburn Building | The University of Manchester | Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039


More information about the Eric mailing list