diff --git a/.pycodestyle.cfg b/.pycodestyle.cfg new file mode 100644 index 000000000..3a7f877fa --- /dev/null +++ b/.pycodestyle.cfg @@ -0,0 +1,16 @@ +[pycodestyle] +; Pycodestyle config options are: +; exclude, filename, select, ignore, max-line-length, max-doc-length, +; hang-closing, count, format, quiet, show-pep8, show-source, +; statistics, verbose + +; Style violations to ignore. +; +; E501: line too long (82 > 79 characters) +; +; For the full list, see: +; https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes + +ignore = E501 + +max-line-length = 99 diff --git a/pocs/tests/test_codestyle.py b/pocs/tests/test_codestyle.py index 59dd891bd..f89e43ab3 100644 --- a/pocs/tests/test_codestyle.py +++ b/pocs/tests/test_codestyle.py @@ -1,3 +1,5 @@ +import os + import pycodestyle import pytest @@ -9,7 +11,8 @@ def dirs_to_check(request): def test_conformance(dirs_to_check): """Test that we conform to PEP-8.""" - style = pycodestyle.StyleGuide(quiet=False, ignore=['E501', 'E402']) + config_file = os.path.join(os.environ['POCS'], '.pycodestyle.cfg') + style = pycodestyle.StyleGuide(quiet=False, config_file=config_file) print(dirs_to_check) style.input_dir(dirs_to_check)