'Can I invoke a pre-formatter when opening a file in pycharm?

I hate black with a passion, and I want to reformat the code so that it doesn't look awful while I am working on it. To do so, I need to invoke my own formatter that undoes black formatting when I open a file, and let black digest it when I commit it.

Is it possible to do so in pycharm? I know that plain vim has such functionality but I can't seem to find it in pycharm.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source