Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

consider implementing Python style checks + standards #271

Closed
miabbott opened this issue Jan 7, 2019 · 4 comments
Closed

consider implementing Python style checks + standards #271

miabbott opened this issue Jan 7, 2019 · 4 comments

Comments

@miabbott
Copy link
Member

miabbott commented Jan 7, 2019

This came up in the review of #270 and rather than litter that review with extraneous comments, let's move it here.

Shortlist of things to implement:

  • document coding standards for Python (target 3.4, using .format(), using os.path.join, etc)
  • run pycodestyle (nee pep8) across the code base
  • wire up TravisCI to run pycodestyle on each PR

Other input welcome. 😄

@ashcrow
Copy link
Member

ashcrow commented Jan 7, 2019

I'm a fan of flake8 for python checking: https://pypi.org/project/flake8/

@arithx
Copy link
Contributor

arithx commented Jan 7, 2019

+1 on flake8, the pep8 checker was a bit too strict when we were using checkers at a previous company.

jlebon pushed a commit that referenced this issue Jan 8, 2019
Split off from #270

This changes all the places where we muck with paths to use
`os.path.join()`.  Hopefully this is start of some coding standards as
discussed in #271.
@darkmuggle
Copy link
Contributor

I'd love to require pylint against new Python.

@dustymabe
Copy link
Member

We have implemented python checks a while ago:

check: flake8 pycheck schema-check mantle-check cosa-go-check
echo OK
pycheck:
python3 -m py_compile $(pysources)
pylint -E $(pysources)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants