| 1 |
[flake8] |
| 2 |
|
| 3 |
# Print the total number of errors: |
| 4 |
count = true |
| 5 |
|
| 6 |
# Don't even try to analyze these: |
| 7 |
extend-exclude = |
| 8 |
# No need to traverse egg info dir |
| 9 |
*.egg-info, |
| 10 |
# GitHub configs |
| 11 |
.github, |
| 12 |
# Cache files of MyPy |
| 13 |
.mypy_cache, |
| 14 |
# Cache files of pytest |
| 15 |
.pytest_cache, |
| 16 |
# Temp dir of pytest-testmon |
| 17 |
.tmontmp, |
| 18 |
# Countless third-party libs in venvs |
| 19 |
.tox, |
| 20 |
# Occasional virtualenv dir |
| 21 |
.venv, |
| 22 |
# VS Code |
| 23 |
.vscode, |
| 24 |
# Temporary build dir |
| 25 |
build, |
| 26 |
# This contains sdists and wheels of pylibsshext that we don't want to check |
| 27 |
dist, |
| 28 |
# Metadata of `pip wheel` cmd is autogenerated |
| 29 |
pip-wheel-metadata, |
| 30 |
|
| 31 |
# IMPORTANT: avoid using ignore option, always use extend-ignore instead |
| 32 |
# Completely and unconditionally ignore the following errors: |
| 33 |
extend-ignore = |
| 34 |
# Legitimate cases, no need to "fix" these violations: |
| 35 |
# E501: "line too long", its function is replaced by `flake8-length` |
| 36 |
E501, |
| 37 |
# W505: "doc line too long", its function is replaced by `flake8-length` |
| 38 |
W505, |
| 39 |
# I: flake8-isort is drunk + we have isort integrated into pre-commit |
| 40 |
I, |
| 41 |
# S101: MyPy requires `asserts`, plus they're not bad if cooked well |
| 42 |
S101, |
| 43 |
# WPS300: local folder imports are needed |
| 44 |
WPS300, |
| 45 |
# WPS305: "Found f string" -- nothing bad about this |
| 46 |
WPS305, |
| 47 |
# WPS317 enforces weird indents |
| 48 |
WPS317, |
| 49 |
# WPS318 enforces weird indents too |
| 50 |
WPS318, |
| 51 |
# WPS326: "Found implicit string concatenation" -- nothing bad about this |
| 52 |
WPS326, |
| 53 |
|
| 54 |
# IMPORTANT: avoid using select option, always use select-ignore instead |
| 55 |
# Enable the following errors: |
| 56 |
extend-select = |
| 57 |
# B950: "line too long", longer than `max-line-length` + 10% |
| 58 |
B950, |
| 59 |
|
| 60 |
# https://wemake-python-stylegui.de/en/latest/pages/usage/formatter.html |
| 61 |
format = wemake |
| 62 |
|
| 63 |
# Let's not overcomplicate the code: |
| 64 |
max-complexity = 10 |
| 65 |
|
| 66 |
# Accessibility/large fonts and PEP8 friendly. |
| 67 |
# This is being flexibly extended through the `flake8-length`: |
| 68 |
max-line-length = 79 |
| 69 |
|
| 70 |
# Allow certain violations in certain files: |
| 71 |
per-file-ignores = |
| 72 |
|
| 73 |
# WPS412 logic of an extension is in __init__.py file |
| 74 |
# F401 imported but unused |
| 75 |
src/sphinxcontrib/towncrier/__init__.py: F401, WPS412 |
| 76 |
# FIXME: WPS201 too many imports |
| 77 |
# FIXME: WPS402 too many `noqa`s |
| 78 |
src/sphinxcontrib/towncrier/ext.py: WPS201, WPS402 |
| 79 |
|
| 80 |
# There are multiple `assert`s (S101) |
| 81 |
# and subprocesses (import – S404; call – S603) in tests; |
| 82 |
# also, using fixtures looks like shadowing the outer scope (WPS442); |
| 83 |
# furthermore, we should be able to import and test private attributes |
| 84 |
# (WPS450) and modules (WPS436) and finally it's impossible to |
| 85 |
# have <= members in tests (WPS202): |
| 86 |
tests/**.py: S101, S404, S603, WPS202, WPS436, WPS442, WPS450 |
| 87 |
|
| 88 |
# Count the number of occurrences of each error/warning code and print a report: |
| 89 |
statistics = true |
| 90 |
|
| 91 |
# flake8-pytest-style |
| 92 |
# PT001: |
| 93 |
pytest-fixture-no-parentheses = true |
| 94 |
# PT006: |
| 95 |
pytest-parametrize-names-type = tuple |
| 96 |
# PT007: |
| 97 |
pytest-parametrize-values-type = tuple |
| 98 |
pytest-parametrize-values-row-type = tuple |
| 99 |
# PT023: |
| 100 |
pytest-mark-no-parentheses = true |
| 101 |
|
| 102 |
# flake8-rst-docstrings |
| 103 |
rst-directives = |
| 104 |
spelling |
| 105 |
rst-roles = |
| 106 |
# Built-in Sphinx roles: |
| 107 |
class, |
| 108 |
file, |
| 109 |
exc, |
| 110 |
meth, |
| 111 |
term, |
| 112 |
py:class, |
| 113 |
py:data, |
| 114 |
py:exc, |
| 115 |
py:meth, |
| 116 |
py:term, |
| 117 |
# Sphinx's internal role: |
| 118 |
event, |
| 119 |
|
| 120 |
# wemake-python-styleguide |
| 121 |
show-source = true |