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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
[flake8]
# Print the total number of errors:
count = true
# Don't even try to analyze these:
extend-exclude =
# Circle CI configs
.circleci,
# No need to traverse egg info dir
*.egg-info,
# GitHub configs
.github,
# Cache files of MyPy
.mypy_cache,
# Cache files of pytest
.pytest_cache,
# Temp dir of pytest-testmon
.tmontmp,
# Occasional virtualenv dir
.venv
# VS Code
.vscode,
# Temporary build dir
build,
# This contains sdists and wheels of cheroot that we don't want to check
dist,
# Metadata of `pip wheel` cmd is autogenerated
pip-wheel-metadata,
# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
# Legitimate cases, no need to "fix" these violations:
E501, # "line too long", its function is replaced by `flake8-length`
W505, # "doc line too long", its function is replaced by `flake8-length`
I # flake8-isort is drunk + we have isort integrated into pre-commit
WPS326 # "Found implicit string concatenation" -- nothing bad about this
# FIXME: These `flake8-annotations` errors need fixing and removal
ANN001, # Missing type annotation for function argument 'argv'
ANN002, # Missing type annotation for *exceptions
ANN003, # Missing type annotation for **kwargs
ANN101, # Missing type annotation for self in method
ANN102, # Missing type annotation for cls in classmethod
ANN201, # Missing return type annotation for public function
ANN202, # Missing return type annotation for protected function
ANN204, # Missing return type annotation for special method
ANN205, # Missing return type annotation for staticmethod
ANN206, # Missing return type annotation for classmethod
# FIXME: These `flake8-annotations` errors need fixing and removal
SC100, # Possibly misspelt word / comments
SC200, # Possibly misspelt word / names
# https://wemake-python-stylegui.de/en/latest/pages/usage/formatter.html
#format = wemake
# Let's not overcomplicate the code:
max-complexity = 10
# Accessibility/large fonts and PEP8 friendly:
max-line-length = 79
# Allow certain violations in certain files:
per-file-ignores =
# There are multiple `assert`s (S101)
# and subprocesses (import – S404; call – S603) in tests:
cheroot/test/test_*.py: S101, S404, S603
# WPS102 Found incorrect module name pattern
# This is not a regular module but a standalone script:
bin/pip-wrapper: WPS102
# FIXME:
cheroot/__init__.py: I003, WPS100, WPS412, WPS420, WPS422, WPS433
cheroot/__main__.py: WPS130, WPS300
cheroot/_compat.py: DAR101, DAR201, DAR301, DAR401, I003, RST304, WPS100, WPS111, WPS123, WPS125, WPS226, WPS229, WPS322, WPS323, WPS420, WPS422, WPS428, WPS432, WPS433, WPS434, WPS440, WPS462, WPS504, WPS505
cheroot/cli.py: DAR101, DAR201, DAR401, I001, I004, I005, WPS100, WPS110, WPS120, WPS130, WPS202, WPS226, WPS229, WPS300, WPS306, WPS326, WPS338, WPS420, WPS421, WPS428, WPS436, WPS437
cheroot/connections.py: DAR101, DAR201, DAR301, DAR401, I001, I003, I004, I005, RST304, S104, WPS100, WPS110, WPS111, WPS121, WPS122, WPS130, WPS201, WPS210, WPS212, WPS214, WPS220, WPS229, WPS231, WPS300, WPS301, WPS306, WPS317, WPS318, WPS323, WPS324, WPS326, WPS337, WPS338, WPS420, WPS421, WPS422, WPS432, WPS433, WPS436, WPS437, WPS440, WPS501, WPS504, WPS505, WPS526
cheroot/errors.py: DAR101, DAR201, I003, RST304, WPS111, WPS121, WPS317, WPS422, WPS428, WPS462
cheroot/makefile.py: DAR101, DAR201, DAR401, E800, I003, I004, N801, N802, S101, WPS100, WPS110, WPS111, WPS117, WPS120, WPS121, WPS122, WPS123, WPS130, WPS204, WPS210, WPS212, WPS213, WPS220, WPS229, WPS231, WPS232, WPS300, WPS306, WPS323, WPS338, WPS420, WPS422, WPS429, WPS431, WPS433, WPS436, WPS437, WPS440, WPS503, WPS504, WPS604, WPS606, WPS609
cheroot/server.py: DAR003, DAR101, DAR201, DAR202, DAR301, DAR401, E800, I001, I003, I004, I005, N806, RST201, RST301, RST303, RST304, WPS100, WPS110, WPS111, WPS115, WPS120, WPS121, WPS122, WPS125, WPS130, WPS132, WPS201, WPS202, WPS204, WPS210, WPS211, WPS212, WPS213, WPS214, WPS220, WPS221, WPS225, WPS226, WPS229, WPS230, WPS231, WPS236, WPS238, WPS300, WPS301, WPS302, WPS306, WPS317, WPS318, WPS322, WPS323, WPS326, WPS329, WPS331, WPS337, WPS338, WPS342, WPS352, WPS410, WPS420, WPS421, WPS422, WPS428, WPS429, WPS432, WPS433, WPS436, WPS437, WPS440, WPS462, WPS503, WPS504, WPS505, WPS510, WPS601, WPS602, WPS608
cheroot/ssl/builtin.py: DAR101, DAR201, DAR401, I001, I003, N806, RST304, WPS110, WPS111, WPS115, WPS117, WPS120, WPS121, WPS122, WPS130, WPS201, WPS210, WPS214, WPS229, WPS231, WPS300, WPS317, WPS318, WPS322, WPS323, WPS326, WPS338, WPS422, WPS428, WPS433, WPS436, WPS437, WPS440, WPS462, WPS501, WPS505, WPS507, WPS529, WPS608, WPS612
cheroot/ssl/pyopenssl.py: C815, DAR101, DAR201, DAR401, I001, I003, I005, N801, N804, RST304, WPS100, WPS110, WPS111, WPS117, WPS120, WPS121, WPS130, WPS210, WPS220, WPS221, WPS225, WPS229, WPS231, WPS238, WPS300, WPS301, WPS304, WPS306, WPS317, WPS318, WPS322, WPS323, WPS335, WPS338, WPS352, WPS420, WPS422, WPS425, WPS428, WPS430, WPS432, WPS433, WPS440, WPS462, WPS501, WPS503, WPS505, WPS601, WPS608, WPS615
cheroot/test/conftest.py: DAR101, DAR201, DAR301, I001, I003, I005, WPS100, WPS130, WPS300, WPS325, WPS354, WPS420, WPS422, WPS430, WPS442, WPS457
cheroot/test/helper.py: DAR101, DAR201, DAR401, I001, I003, I004, N802, WPS110, WPS111, WPS121, WPS201, WPS220, WPS231, WPS301, WPS306, WPS323, WPS337, WPS414, WPS421, WPS422, WPS503, WPS505, WPS508
cheroot/test/test_cli.py: DAR101, DAR201, I001, I005, N802, S101, S108, WPS110, WPS306, WPS317, WPS421, WPS431, WPS442
cheroot/test/test_makefile.py: DAR101, DAR201, I004, RST304, S101, WPS110, WPS122, WPS306
cheroot/test/test_wsgi.py: DAR101, DAR301, I001, I004, S101, WPS110, WPS111, WPS117, WPS118, WPS121, WPS210, WPS421, WPS430, WPS432, WPS436, WPS437, WPS441, WPS442, WPS509
cheroot/test/test_core.py: C815, DAR101, DAR201, DAR401, I003, I004, N805, N806, S101, WPS110, WPS111, WPS114, WPS121, WPS202, WPS204, WPS226, WPS229, WPS302, WPS306, WPS317, WPS323, WPS324, WPS326, WPS421, WPS422, WPS432, WPS437, WPS442
cheroot/test/test_dispatch.py: DAR101, DAR201, S101, WPS111, WPS121, WPS302, WPS422, WPS430
cheroot/test/test_ssl.py: C818, DAR101, DAR201, DAR301, DAR401, E800, I001, I003, I004, I005, S101, S309, S404, S603, WPS100, WPS110, WPS111, WPS114, WPS121, WPS130, WPS201, WPS202, WPS204, WPS210, WPS211, WPS218, WPS219, WPS222, WPS226, WPS231, WPS300, WPS301, WPS317, WPS318, WPS324, WPS326, WPS335, WPS336, WPS337, WPS352, WPS408, WPS420, WPS421, WPS422, WPS432, WPS436, WPS440, WPS441, WPS442, WPS450, WPS509, WPS510, WPS608
cheroot/test/test_server.py: DAR101, DAR201, DAR301, I001, I003, I004, I005, S101, WPS110, WPS111, WPS118, WPS121, WPS122, WPS130, WPS201, WPS202, WPS210, WPS218, WPS229, WPS300, WPS317, WPS318, WPS324, WPS326, WPS421, WPS422, WPS430, WPS432, WPS433, WPS436, WPS437, WPS442, WPS507, WPS509, WPS608
cheroot/test/test_conn.py: B007, DAR101, DAR201, DAR301, DAR401, E800, I001, I003, I004, I005, N802, N805, RST304, S101, S310, WPS100, WPS110, WPS111, WPS114, WPS115, WPS120, WPS121, WPS122, WPS201, WPS202, WPS204, WPS210, WPS211, WPS213, WPS214, WPS218, WPS219, WPS226, WPS231, WPS301, WPS306, WPS317, WPS318, WPS323, WPS326, WPS361, WPS420, WPS421, WPS422, WPS425, WPS429, WPS430, WPS432, WPS435, WPS436, WPS437, WPS440, WPS442, WPS447, WPS462, WPS508, WPS509, WPS510, WPS526
cheroot/test/webtest.py: B007, DAR101, DAR201, DAR401, I001, I003, I004, N802, RST303, RST304, S101, S104, WPS100, WPS110, WPS111, WPS115, WPS120, WPS121, WPS122, WPS201, WPS202, WPS204, WPS210, WPS211, WPS213, WPS214, WPS220, WPS221, WPS223, WPS229, WPS230, WPS231, WPS236, WPS301, WPS306, WPS317, WPS323, WPS326, WPS338, WPS361, WPS414, WPS420, WPS421, WPS422, WPS430, WPS432, WPS433, WPS437, WPS440, WPS501, WPS503, WPS505, WPS601
cheroot/testing.py: B014, C815, DAR101, DAR201, DAR301, I001, I003, S104, WPS100, WPS211, WPS229, WPS301, WPS306, WPS317, WPS414, WPS420, WPS422, WPS430, WPS503, WPS526
cheroot/workers/threadpool.py: B007, DAR101, DAR201, E800, I001, I003, I004, RST201, RST203, RST301, WPS100, WPS110, WPS111, WPS121, WPS125, WPS211, WPS214, WPS220, WPS229, WPS230, WPS231, WPS304, WPS306, WPS317, WPS318, WPS322, WPS326, WPS335, WPS338, WPS362, WPS410, WPS414, WPS420, WPS422, WPS428, WPS432, WPS440, WPS462, WPS501, WPS505, WPS601, WPS602, WPS609
cheroot/wsgi.py: DAR101, DAR201, DAR401, I001, I003, I005, N801, RST201, RST301, WPS100, WPS110, WPS111, WPS114, WPS121, WPS122, WPS125, WPS130, WPS210, WPS211, WPS226, WPS229, WPS231, WPS300, WPS306, WPS317, WPS322, WPS323, WPS326, WPS338, WPS420, WPS421, WPS422, WPS428, WPS430, WPS436, WPS462, WPS501, WPS504, WPS602, WPS608
cheroot/ssl/__init__.py: DAR101, DAR201, I003, WPS306, WPS317, WPS318, WPS412, WPS422
cheroot/test/_pytest_plugin.py: DAR101, I003, I004, WPS326, WPS422, WPS437
cheroot/test/test__compat.py: DAR101, I001, I003, I005, WPS116, WPS226, WPS302, WPS317, WPS318, WPS326, WPS422, WPS436, S101
cheroot/test/test_errors.py: DAR101, WPS300, WPS317, WPS436, WPS509, S101
docs/conf.py: E800, I001, I004, WPS226, WPS301, WPS305, WPS323, WPS326, WPS420, WPS433, WPS453
docs/scm_tag_titles_ext.py: DAR101, DAR201, DAR401, E800, I001, I004, N801, S404, S603, WPS210, WPS226, WPS301, WPS305, WPS317, WPS323, WPS407, WPS453
docs/spelling_stub_ext.py: DAR101, DAR201
setup.py: WPS453
# Count the number of occurrences of each error/warning code and print a report:
statistics = true
# flake8-eradicate
# E800:
eradicate-whitelist-extend = isort:\s+\w+
# flake8-pytest-style
# PT001:
pytest-fixture-no-parentheses = true
# PT006:
pytest-parametrize-names-type = tuple
# PT007:
pytest-parametrize-values-type = tuple
pytest-parametrize-values-row-type = tuple
# PT023:
pytest-mark-no-parentheses = true
# flake8-rst-docstrings
rst-directives =
spelling
rst-roles =
# Built-in Sphinx roles:
class,
data,
exc,
meth,
term,
py:class,
py:data,
py:exc,
py:meth,
py:term,
# Sphinx's internal role:
event,
# wemake-python-styleguide
show-source = true
|