Start using auto-formatters#754
Conversation
3aff45c to
b983b61
Compare
| bandit-baseline -r bandit -ll -ii | ||
|
|
||
| [testenv:pep8] | ||
| ignore_errors = true |
There was a problem hiding this comment.
This is because pylint throws tracebacks if we don't upgrade the version, and spews a bunch of new issues if we do. So for now, let's leave it static and upgrade it in a separate PR
|
|
||
| [testenv:pylint] | ||
| commands = pylint --rcfile=pylintrc bandit | ||
| commands = -pylint --rcfile=pylintrc bandit |
There was a problem hiding this comment.
The leading - tells tox to ignore a non-zero exit code
| [testenv:format] | ||
| skip_install = true | ||
| deps = | ||
| pre-commit |
There was a problem hiding this comment.
pre-commit is great. It runs things like pyupgrade the way pyupgrade wants to be run (passing in each file independently). It can be used in local development as well and could run the rest of our linters for us for local development too
|
@ericwb if you have a chance |
Use black to auto-format the style so it's always consistent and pyupgrade will allow us to auto-upgrade to the newest language features.
b983b61 to
8e056d4
Compare
|
@lukehinds @ericwb could you two take a gander at this? |
There was a problem hiding this comment.
The auto-formatter seems to indiscriminately changing all single quotes to double quote strings. Even though I believe many uses of single quote are appropriate. PEP8 doesn't establish a recommendation (https://www.python.org/dev/peps/pep-0008/#string-quotes), but I see other references that distinguish a difference. (https://www.askpython.com/python/string/difference-between-single-and-double-quotes-in-python). I guess I'm fine with either, but we probably need to document a coding standards doc for the project.
Use black to auto-format the style so it's always consistent and
pyupgrade will allow us to auto-upgrade to the newest language features.