Skip to content

PyCharm For Refactoring

Xavier Bouthillier edited this page Mar 4, 2014 · 2 revisions

Investigated by @bouthilx, here’s his writeup:

I have tried three different things.

  1. Renaming a class

  2. Renaming a method attribute’s name

  3. Changing the signature of a method.

With 1. we have the options of renaming also in comments, strings, text occurrences, inheritors and the name of containing file. When I tried to change MLP class name, it did find it even in files like scripts/icml_2013_wrepl/emotions/make_submission.py where it is only present as text. However, it skipped every yaml files. Looking to this http://stackoverflow.com/questions/19967224/how-do-i-get-yaml-syntax-highlighting-in-pycharm, it seams that we need the Pro version (I used community version) to handle yaml files. If I rename the yaml files to txt files, It does find every MLP for refactoring.

With 2. there is only options to rename in comments, strings and parameters in the hierarchy. It won’t find attributes in yaml files even if changed to txt files. We would need to investigate with Pro version to see if it works with yaml files.

There is not as much options for changing the signature of a method. It will only find it in code. It might be different with a Pro version that can handle yaml files, but I am skeptical.

Clone this wiki locally