4328169274
We've had many checks disabled - these are the ones we actually lose: L104 Docstrings must use Napoleon, not reStructuredText fields. L205 __init__.py is not allowed to contain function or class definitions. L206 Implicit relative imports are not allowed. L208 Pokémon exception handling is always a mistake. If the intent is really to catch and ignore exceptions, explicitly name which exception types to silence. L209 return, del, raise, assert, print (in python 2, without print_function) yield, and yield from are statements, not functions, and as such, do not require parentheses. L210 Instead of intentionally relying on the side effects of map, filter, or a comprehension, write an explicit for loop. L211 Using map or filter with a lambda as the first argument is always better written as list comprehension or generator expression. An expression is more readable and extensible, and less importantly, doesn't incur as much function call overhead. L212 Using @staticmethod is always wrong. L301 Files must end with a trailing newline. L303 noqa is ignored, and as such, # noqa comments should be deleted to reduce pointless noise. However, most of those are also checked by pylint (and the rest I don't really care about), and ebb-lint increases flake8's runtime a lot (45s -> almost 2min).
49 lines
1.9 KiB
INI
49 lines
1.9 KiB
INI
[flake8]
|
|
exclude = .venv,.hypothesis,.git,__pycache__,resources.py
|
|
# E128: continuation line under-indented for visual indent
|
|
# E226: missing whitespace around arithmetic operator
|
|
# E265: Block comment should start with '#'
|
|
# E501: Line too long
|
|
# E402: module level import not at top of file
|
|
# E266: too many leading '#' for block comment
|
|
# F401: Unused import
|
|
# N802: function name should be lowercase
|
|
# P101: format string does contain unindexed parameters
|
|
# P102: docstring does contain unindexed parameters
|
|
# P103: other string does contain unindexed parameters
|
|
# D102: Missing docstring in public method (will be handled by others)
|
|
# D103: Missing docstring in public function (will be handled by others)
|
|
# D104: Missing docstring in public package (will be handled by others)
|
|
# D105: Missing docstring in magic method (will be handled by others)
|
|
# D209: Blank line before closing """ (removed from PEP257)
|
|
# D211: No blank lines allowed before class docstring
|
|
# (PEP257 got changed, but let's stick to the old standard)
|
|
# D402: First line should not be function's signature (false-positives)
|
|
# D403: First word of the first line should be properly capitalized
|
|
# (false-positives)
|
|
# H101: Use TODO(NAME)
|
|
# H201: bare except
|
|
# H238: Use new-stule classes
|
|
# H301: one import per line
|
|
# H306: imports not in alphabetical order
|
|
ignore =
|
|
E128,E226,E265,E501,E402,E266,
|
|
F401,
|
|
N802,
|
|
P101,P102,P103,
|
|
D102,D103,D104,D105,D209,D211,D402,D403,
|
|
H101,H201,H238,H301,H306
|
|
min-version = 3.4.0
|
|
max-complexity = 12
|
|
putty-auto-ignore = True
|
|
putty-ignore =
|
|
/# pylint: disable=invalid-name/ : +N801,N806
|
|
/# pylint: disable=wildcard-import/ : +F403
|
|
/# pragma: no mccabe/ : +C901
|
|
tests/*/test_*.py : +D100,D101,D401
|
|
tests/unit/browser/webkit/http/test_content_disposition.py : +D400
|
|
scripts/dev/ci/appveyor_install.py : +FI53
|
|
copyright-check = True
|
|
copyright-regexp = # Copyright [\d-]+ .*
|
|
copyright-min-file-size = 110
|