-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.cfg
27 lines (27 loc) · 1.57 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[flake8]
; E265 block comment should start with '# '
; - because temporarily commenting out code as '#code' is fine and the lack of
; whitespace indicates that it's a (potentially long-term) hack
; E226 missing whitespace around arithmetic operator
; - while 'a + b' is preferred over 'a+b', there are cases like
; 'buff[off:off+args_len]' where adding spaces around '+' would make the code
; less clear and actively deceptive, 'buff[off:off + args_len]', suggesting
; that 'off:off' and 'args_len' are two separate things, where in fact '+'
; is the higher-precedence operator
; - this applies to other uses of logical visual operator separation,
; ie. 'x = 1+2+3 + thing() + 5*[y]'
; E231 missing whitespace after ','
; - same thing as E226, especially for single-digit enumerations
; W503 line break before binary operator
; - this is actually a wrong recommendation as
; https://www.flake8rules.com/rules/W503.html
; freely admits, new code should use Knuth's notation, see also
; https://peps.python.org/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
; E306 empty line between nested function declaration and its parent
; - this seems like a bad idea, all other code is fine to be written directly
; after the (parent) function declaration, so why not another 'def'?
; - allowing this arguably helps readability, as it allows condensed code
; to appear where it makes sense (tightly integrated nested 1-line functions)
; rather than having to 'foo = lambda x: something(x)' and breaking debug
extend-ignore = E265,E226,E231,W503,E306
max-line-length = 99