[Eric] Refactor by renaming a package

Detlev Offenbach detlev at die-offenbachs.de
Sun Nov 10 09:40:39 GMT 2019


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.

Regards,
Detlev

Am Samstag, 9. November 2019, 22:19:03 CET schrieb Tony Arnold:
> Is there a way to refactor by renaming a package? I don't see an option
> under the Rope refactoring menu but maybe I'm missing something?
 
> 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

-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the Eric mailing list