Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.flake8 984 B
# file: $PROJ/.flake8
#
# This config expects that the flake8-bugbear extension to be installed.
# bugbear looks at the line length and allows a slight variance as opposed
# to a hard limit.  When it detects excessive line lengths, it returns B950.
# This config looks for B950 and ignores the default flake8 E501 line length error.

[flake8]
max-complexity = 10
max-line-length = 131
select = C,E,F,W,B,B950
# B,C,E,F,W,T4,B9
ignore =
       # Use bugbear line length detection instead of default
       E501,
       # PEP8 allows hanging indent, but E126 dosn't seem to.
       E126,
       # E402 refers to imports only being at the top of a file.
       E402
       # W503 Should a Line Break Before or After a Binary Operator? pep is not consistant
       # https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
       W503
       # E203, E266, F403, F401
       # C901 is too complex
       C901

# Local Variables:
# mode: conf
# End: