Skip to content

Commit 8004cf7

Browse files
GaryWLabartlet
authored andcommitted
pep8 tidy up config
Enable the following warnings: E126: continuation line over-indented for hanging indent E131: continuation line unaligned for hanging indent E203: whitespace before ':' E221: multiple spaces before operator E501: line too long E722: do not use bare 'except' These were originally chosen so that as much of the existing samba code passed. With the intention of integrating PEP8 checking into build process. But the PEP8 output does not integrate into the known fail mechanism, so this approach was abandoned. setup.cfg is the default PEP8 config file having these exceptions enabled means that new code can be added with those issues. Also tools like pyls (python language server) use setup.cfg. Disable the following warnings: E402: module level import not at top of file Samba has a significant amount of code setting sys.path.insert(0, "bin/python") W503: Line break before binary operator We need to have a preference, and PEP8 expresses a weak preference for disabling 503 Signed-off-by: Gary Lockyer <[email protected]> Reviewed-by: Andrew Bartlett <[email protected]> Reviewed-by: Douglas Bagnall <[email protected]> Autobuild-User(master): Andrew Bartlett <[email protected]> Autobuild-Date(master): Thu Dec 17 00:54:51 UTC 2020 on sn-devel-184
1 parent 1ed461a commit 8004cf7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

setup.cfg

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
[pycodestyle]
22
# refer to: https://pep8.readthedocs.io/en/1.4.6/intro.html#error-codes
3-
# E126: continuation line over-indented for hanging indent
4-
# E131: continuation line unaligned for hanging indent
5-
# E203: whitespace before ':'
6-
# E221: multiple spaces before operator
7-
# E501: line too long
8-
# E722: do not use bare 'except'
9-
ignore = E126,E131,E203,E221,E501,E722
10-
exclude = bin,heimdal,wscript,third_party,wafsamba,tdb,.ycm_extra_conf.py,examples,python/samba/subunit/run.py,autobuild.py
3+
# E402: module level import not at top of file
4+
# W503: line break before binary operator
5+
#
6+
ignore = E402,W503
117
show-source = true
128
statistics = true

0 commit comments

Comments
 (0)