First things first: we are using black to format the code. Install it (either from package manager or via pip) and run it before you make a commit. CI is configured to check if the code is formatted correctly and will fail if the formatting differs.
make stylish invokes several programs.
rpmlintchecks if our
.specfile is formatted correctly.
flake8checks all Python files for formatting issues.
blacksolves many of them, so you will get list of undefined variables, imported-yet-unused packages or list of lines that are too long.
You can write small bash script that will be invoked every time you make a commit or before you make a push.
Place a file to
#!/usr/bin/bash black . flake8
Please note that this will not work for branches that were not formatted with
black, e.g. all of RHEL 8 and RHEL 9.0 as well (up until subscription-manager-1.29.28).