The code written could be formatted better with black.
black.
The black homepage can be found here
Please feel free to create a PR