|
1 | 1 | [metadata] |
2 | 2 | description_file = README.rst |
| 3 | + |
| 4 | +# Recommended flake8 settings while editing zoom, we use Black for the final |
| 5 | +# linting/say in how code is formatted |
| 6 | +# |
| 7 | +# pip install flake8 flake8-bugbear |
| 8 | +# |
| 9 | +# This will warn/error on things that black does not fix, on purpose. |
| 10 | + |
| 11 | +# This config file MUST be ASCII to prevent weird flake8 dropouts |
| 12 | + |
| 13 | +[flake8] |
| 14 | +# max-line-length setting: NO we do not want everyone writing 120-character lines! |
| 15 | +# We are setting the maximum line length big here because there are longer |
| 16 | +# lines allowed by black in some cases that are forbidden by flake8. Since |
| 17 | +# black has the final say about code formatting issues, this setting is here to |
| 18 | +# make sure that flake8 doesn't fail the build on longer lines allowed by |
| 19 | +# black. |
| 20 | +max-line-length = 120 |
| 21 | +max-complexity = 12 |
| 22 | +select = E,F,W,C,B,B9 |
| 23 | +ignore = |
| 24 | + # E123 closing bracket does not match indentation of opening bracket's line |
| 25 | + E123 |
| 26 | + # E203 whitespace before ':' (Not PEP8 compliant, Python Black) |
| 27 | + E203 |
| 28 | + # E501 line too long (82 > 79 characters) (replaced by B950 from flake8-bugbear, |
| 29 | + # https://github.com/PyCQA/flake8-bugbear) |
| 30 | + E501 |
| 31 | + # W503 line break before binary operator (Not PEP8 compliant, Python Black) |
| 32 | + W503 |
| 33 | + # W504 line break after binary operator (Not PEP8 compliant, Python Black) |
| 34 | + W504 |
| 35 | + # C901 function too complex - since many of zz9 functions are too complex with a lot |
| 36 | + # of if branching |
| 37 | + C901 |
| 38 | + # module level import not at top of file. This is too restrictive. Can't even have a |
| 39 | + # docstring higher. |
| 40 | + E402 |
| 41 | +per-file-ignores = |
| 42 | + # These are config files. The `c` variable them is injected not defined. |
| 43 | + pow/ansible/roles/jupyterhub/templates/jupyterhub_config*.py:F821 |
| 44 | + # Ignore some errors in files that are stolen from other projects to avoid lots |
| 45 | + # of merge problems later . |
| 46 | + pow/ansible/roles/webtier/files/supervisor_httpgroupok.py:E126,E128,E222,E225,E226,E261,E301,E302,E305,F841,E201,E202 |
| 47 | + silhouette/src/silhouette/gprof2dot.py:E711,E713,E741,F401 |
| 48 | + # Ignore undefined name errors in "expectation" test Python code. |
| 49 | + # These files get exec'd in an environment that defines the variables. |
| 50 | + server/tests/files/expectations/*.py:F821 |
0 commit comments