Open msparapa opened 5 years ago
Sounds fine with me, it will limit odd out of place PEP 8 commits from me
Looking into this further, autopep8 is a tool to automatically format code according to pep8, which we probably shouldn't do. pylint is the tool that does the check. I ran it on beluga and, in addition to every pep8 violation, I got this output
Your code has been rated at -0.97/10
🤔
It would be pretty slick if we automatically ran pylint as some sort of continuous integration test case.
I volunteer to go through the code and refactor everything to match.
This site recommends pycodestyle or flake8: https://realpython.com/python-pep8/#linters
Maybe we try a few before integration? Or not, they are probably all similar.
@msparapa Question? Why do many of our classes use __new__
instead of __init__
? I know I asked before, but I forget. It's not like we are subclassing an immutable type.
Because I went overkill. ~80% of the classes using __new__
should just use __init__
instead.
Adding a linter will help us adhere to coding standards. Sean, you're already good about this, but I'm really lazy about formatting. I think autopep8 could help us (i.e. me) enforce this better.