Upgraded a Python 2 codebase? Old habits when typing super?
Remove class names and self/cls from super() calls when they are not needed.
pip install super3
View all the old-style super calls with --list.
super3 --list path/to/code
- Only run against code you have version controlled or otherwise backed up
- After running super3, use Black or another automatic formatter to make things look good. super3 is super focused and super simple, we don't try to do any more than is needed.
Okay, got that? Then run the command with no flags to make the change.
super3 path/to/code