Skip to content

Commit

Permalink
Enable flake8 testing with pytest
Browse files Browse the repository at this point in the history
Mask E402 in two files until Python2 is dropped
  • Loading branch information
timj committed Aug 30, 2017
1 parent 7c86ef0 commit 81c83eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# The ignore list for flake8 itself when run on the command line is distinct
# from the ignore list used by the pytest-flake8 plugin. This provides more
# control over testing but does require that the lists are kept in sync
# if there are later changes to the developer guide standard.
[flake8]
max-line-length = 110
ignore = E133, E226, E228, N802, N803, N806
exclude = __init__.py, testLib.py, ticket1914.py

[tool:pytest]
addopts = --flake8
flake8-ignore = E133 E226 E228 N802 N803 N806
# These can be fixed when python2 is dropped
# ie E402 module level import not at top of file
# These are caused by storing `str` before imports override it
python/lsst/pex/config/choiceField.py E402
python/lsst/pex/config/config.py E402
2 changes: 1 addition & 1 deletion tests/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from lsst.sconsUtils import scripts
scripts.BasicSConscript.pybind11(['testLib'])
scripts.BasicSConscript.tests(noBuildList=['testLib.cc'],
ignoreList=['testLib.py'])
pyList=[])

0 comments on commit 81c83eb

Please sign in to comment.