Skip to content

Python code formatting

I ran into some issues due to inconsistent use of tabs and spaces, as described in #10 (closed). While fixing the line flagged there, I found quite a few more. It looks like 4 spaces were preferred for indentation in the python scripts. This MR tries to implement this consistently. Furthermore, I cleaned up trailing whitespaces. There are a lot of changes and it's possible I overlooked some.

I also found some places where print was not used as a function print() (but python-2 style) and updated everywhere to print(). Given that the function version was already used in other places in the code, I didn't do any from __future__ import print_function for backwards compatibility, but I guess we can add it if needed (if the code is at all py2 compatible).

Feel free to reject if you only want the bare minimum of changes implemented to fix the bug. I think the cosmetic changes are good to have implemented though, and I believe the unified formatting can prevent accidental bugs due to indendation.

fixes #10 (closed)

Edited by Alexander Held

Merge request reports