From 18e4c1b0ac634057ffd3f172f7c6df2be740824a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 16 May 2018 00:34:45 +0200 Subject: [PATCH] add new flake8-plugins and revise config --- setup.cfg | 10 +++++++++- tox.ini | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ea43f22..64dd7c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,4 +9,12 @@ universal=1 [flake8] exclude = .git,.tox,.github,.eggs,__pycache__,doc/conf.py,build,dist,capabilities-data,test,src/escpos/constants.py max-line-length = 120 -# future-imports = absolute_import, division, print_function, unicode_literals # we are not there yet +accept-encoding = utf-8, utf-16 +require-code = True +# FI12 __future__ import "with_statement" missing +# FI15 __future__ import "generator_stop" missing +# FI16 __future__ import "nested_scopes" missing +# FI17 __future__ import "generators" missing +# FI5x __future__ import "xxx" present +ignore = FI12,FI15,FI16,FI17,FI5 +copyright-check = True diff --git a/tox.ini b/tox.ini index 142ca43..7dae2a4 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,12 @@ commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:flake8] basepython = python -# TODO add flake8-future +# TODO add flake8-print after adding logging # TODO add flake8-docstrings deps = flake8 + flake8-coding + flake8-copyright + flake8-future-import + flake8-quotes + flake8-import-order commands = flake8