Skip to content

Instantly share code, notes, and snippets.

@druckdev
druckdev / refactor.md
Last active September 28, 2021 09:59
Refactoring from camelCase to snake_case (functions, variables & files)

For a project that sadly will not be made public (See PR) I had to rename some components. This is of course a very specific solution targeted only to our project but maybe it can help/give a starting point for a similar problem. Here is the documentation from the pull request:

Pull request

Trying to rename components to use the snake case naming. (See PEP 8)

I am not happy with the result that the full fledged IDE pycharm brings. (I also just dislike those super heavy programs) Since some of the variable names are used in strings to access fields in the jsons I cannot simply rename every occurrence. Pycharm gives the option to exclude matches in strings etc, but I still would have to do it for every component.