|
| 1 | +# Custom Flake8 configuration for community add-on template |
| 2 | +# Based on NVDA's Flake8 configuration with modifications for the basic add-on template (edited by Joseph Lee) |
| 3 | + |
| 4 | +[flake8] |
| 5 | + |
| 6 | +# Plugins |
| 7 | +use-flake8-tabs = True |
| 8 | +# Not all checks are replaced by flake8-tabs, however, pycodestyle is still not compatible with tabs. |
| 9 | +use-pycodestyle-indent = False |
| 10 | +continuation-style = hanging |
| 11 | +## The following are replaced by flake8-tabs plugin, reported as ET codes rather than E codes. |
| 12 | +# E121, E122, E123, E126, E127, E128, |
| 13 | +## The following (all disabled) are not replaced by flake8-tabs, |
| 14 | +# E124 - Requires mixing spaces and tabs: Closing bracket does not match visual indentation. |
| 15 | +# E125 - Does not take tabs into consideration: Continuation line with same indent as next logical line. |
| 16 | +# E129 - Requires mixing spaces and tabs: Visually indented line with same indent as next logical line |
| 17 | +# E131 - Requires mixing spaces and tabs: Continuation line unaligned for hanging indent |
| 18 | +# E133 - Our preference handled by ET126: Closing bracket is missing indentation |
| 19 | + |
| 20 | + |
| 21 | +# Reporting |
| 22 | +statistics = True |
| 23 | +doctests = True |
| 24 | +show-source = True |
| 25 | + |
| 26 | +# Options |
| 27 | +max-complexity = 15 |
| 28 | +max-line-length = 110 |
| 29 | +# Final bracket should match indentation of the start of the line of the opening bracket |
| 30 | +hang-closing = False |
| 31 | + |
| 32 | +ignore = |
| 33 | + ET113, # use of alignment as indentation, but option continuation-style=hanging does not permit this |
| 34 | + W191, # indentation contains tabs |
| 35 | + W503, # line break before binary operator. We want W504(line break after binary operator) |
| 36 | + |
| 37 | +builtins = # inform flake8 about functions we consider built-in. |
| 38 | + _, # translation lookup |
| 39 | + pgettext, # translation lookup |
| 40 | + |
| 41 | +exclude = # don't bother looking in the following subdirectories / files. |
| 42 | + .git, |
| 43 | + __pycache__, |
0 commit comments