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
Pylint and flake8 #214
Pylint and flake8 #214
Conversation
c12b0f6
to
56d9de2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall fantastic work! Couple of minor things, mostly due to some slight logic/formatting changes to appease the linters.
I added some fixes for VS Code.
|
Pushed fixes to the previous round of comments, including a new set of tests for AutoFreezer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, as always, love your work! Let's merge this 😃
Background
In #212 we switched to using
pytest
to handle our tests, since it can drive other tools with plugins, such aspytest-mypy
which we also added in that PR.Motivation
Pytest and mypy are nice, but we'd also like to use pylint and flake8.
Changes
setup.py
:pytest-flake8
andpytest-pylint
are added to the[test]
dependencies groupNew parameters in the
pytest.ini
file:-p no:cacheprovider
turns off caching, because it just wastes CPU/IO in CI/CD (the cache folder is going to disappear at the end), and it causes false positives and false negatives locally if you edit which checks are disabled--mypy --pylint --flake8
ensures that runningpytest
will always run mypy, pylint, and flake8. This way the individual dev doesn't have to know or remember which tools we use or how to call them; they'll all be pulled in automatically with a simpler commandWorkflow step and Dockerfile:
pytest -v
which will run everything thanks to thepytest.ini
changes.pylintrc
:.flake8
:Lots of minor changes to code to fix complaints from the still-enabled checks from both tools.