Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pycodestyle #220

Merged
merged 5 commits into from Jun 10, 2019
Merged

Pycodestyle #220

merged 5 commits into from Jun 10, 2019

Conversation

opoplawski
Copy link
Contributor

pep8 has been replaced with codestyle.

pytest-cache is now included in pytest.

@opoplawski
Copy link
Contributor Author

Well, that's a bit of a mess then isn't it? At least for python 3.5+ it seems it's just a matter of dealing with some new checks. But with 2.7 and 3.4 there seem to be some strange compatibility issues.

@danmichaelo
Copy link
Member

You are right, we should move from pep8. Annoying thing is that, while pycodestyle works with Python 2.7, pytest-codestyle does not.

But then there is flake8, which combines pycodestyle, pyflakes and more (mccabe). So my first idea was to try pytest-flake8 instead, since it works with Python 2.7, but it turned out to have its own quirks (not supporting the same flags as flake8 itself, for instance exclude is not supported). It also seems a bit inefficient as it re-initializes flake8 for every single file. And I really dislike that you have to specify flake8 options under the [pytest] heading in setup.cfg, not under [flake8], which means that you have to duplicate the options if you also would like to support running flake8 standalone.

So... wait… do we really need to do linting and style checking through pytest? Probably not :) It seems like we will get a more clean and stable setup by letting pytest just run the tests, and then run flake8 (or pycodestyle or whatever) separately, so I will prepare that.

@danmichaelo danmichaelo merged commit a4b7985 into mwclient:master Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants