grapheo12 / iqps

Web-app meant for qp.metakgp.org
MIT License
20 stars 21 forks source link

Add sanity script to comply with PEP8 #18

Closed mukul-mehta closed 4 years ago

mukul-mehta commented 4 years ago

This PR adds a sanity.sh script that can be run to ensure there are no PEP8 errors. It uses the configurations defined in .pycodestylerc and .pydocstylerc to run checks.

pep8speaks commented 4 years ago

Hello @mukul-mehta! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 11:1: E305 expected 2 blank lines after class or function definition, found 1 Line 11:1: E402 module level import not at top of file

Comment last updated at 2020-07-06 21:34:13 UTC
mukul-mehta commented 4 years ago

@grapheo12 In pycodestyle settings, I've set the max line length parameter to be 120. Let's choose either 79 or 120 and then use that value for both pep8speaks and pycodestyle.

grapheo12 commented 4 years ago

@mukul-mehta Can you please rebase your PR? I've recently cleaned up most of the PEP8 issues in #16 . Also let's keep the max line length to 120. Can you add a .pep8speaks.yml file?

mukul-mehta commented 4 years ago

@grapheo12 Sure, I'll make the changes.

grapheo12 commented 4 years ago

@mukul-mehta How to use this sanity.sh file? How to ensure it runs on every PR?

mukul-mehta commented 4 years ago

@grapheo12 For now, I'm using a local pre-commit hook. I believe it would be a good idea to setup Travis or CircleCI to run the sanity script.