danielnyga / pracmln

Markov Logic Networks in Python
http://www.pracmln.org
BSD 2-Clause "Simplified" License
134 stars 46 forks source link

PEP8 compliance #11

Open kaivalyar opened 6 years ago

kaivalyar commented 6 years ago

I used flake8 to check for PEP8 compliance on the entire pracmln codebase - running separate commands for both the python2 and python3 folders:

$ python2 -m flake8 pracmln/python2 | wc -l
7519
$ python3 -m flake8 pracmln/python3 | wc -l
5598

Maybe there could be an addition to the README.md (or CONTRIBUTING.md) indicating which of the PEP8 guidelines are to be followed in this project. That way changes to the code can be prioritised to improve compliance with those guidelines that matter most, before moving on to the rest of PEP8.

kaivalyar commented 6 years ago

Assuming that any such list would have at E999 at the very top (representing syntax errors), I went ahead and ran:

$ python2 -m flake8 --select=E999 pracmln/python2
$ python3 -m flake8 --select=E999 pracmln/python3
pracmln/python3/rosmln/scripts/mln_client.py:16:34: E999 SyntaxError: invalid syntax

Indicating there were no syntax errors in the python2 folder, and one syntax error in the python3 folder. This has been fixed in #12 . Once the exact list is finalised, more such errors can be fixed. Here is a branch where I've started to work on some other errors, for example.