Packt-Publishing-Free-Learning icon indicating copy to clipboard operation
Packt-Publishing-Free-Learning copied to clipboard

Lint the code with pylama

Open mjenczmyk opened this issue 7 years ago • 8 comments

As code in this repo is becoming more and more compliant with PEP8 it would be nice to use pylama to lint it - it's easy to configure Travis to run pylama on every PR and warn about style issues in PR changes. Existing and harder to resolve issues could be ignored in pylama configuration and resolved later.

To be done:

  • [ ] use pylint linter;
  • [x] use mccabe linter;
  • [x] use pycodestyle linter;
  • [x] use pyflakes linter;
  • [ ] use pydocstyle linter;
  • [x] configure Travis task;

mjenczmyk avatar Aug 28 '17 16:08 mjenczmyk

Feel free to add a job on travis or circleci.com

luk6xff avatar Sep 03 '17 21:09 luk6xff

I have made a pull request with simple pylama configuration (that will configure pylama with mccabe, pycodestyle and pyflakes linters). Next I'll figure out how to configure Travis (but I suppose you will have to enable travis builds yourself as a repo owner).

mjenczmyk avatar Sep 04 '17 20:09 mjenczmyk

OK, I have also added a Travis configuration in #73. Could you enable build on Travis (it should hopefully detect this branch whenever there will be a new push)?

mjenczmyk avatar Sep 04 '17 21:09 mjenczmyk

@mjenczmyk very good job, Thx! I'll test it after work and do merge

luk6xff avatar Sep 05 '17 08:09 luk6xff

Already merged

luk6xff avatar Sep 13 '17 23:09 luk6xff

Could you reopen this? There is still pylint and pydocstyle to be enabled.

Have we checked that Travis CI runs pylama when pull request is made/updated?

Also, from now we shouldn't push directly to master (can we secure this branch from pushing and leave pull requests as the only way of updating this?).

mjenczmyk avatar Sep 17 '17 10:09 mjenczmyk

ok, sorry : )

  1. Yeah, check this out: https://travis-ci.org/igbt6/Packt-Publishing-Free-Learning

luk6xff avatar Sep 17 '17 20:09 luk6xff

Thanks, Travis is configured indeed.

mjenczmyk avatar Sep 17 '17 22:09 mjenczmyk