[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,
  # Countless third-party libs in venvs
  .tox,
  # Occasional virtualenv dir
  .venv,
  # VS Code
  .vscode,
  # Temporary build dir
  build,
  # This contains sdists and wheels 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:
  # D202: No blank lines allowed after function docstring, conflicts with `ruff format`
  D202,
  # E203: whitespace before ':', conflicts with `ruff format`
  E203,
  # E501: "line too long", its function is replaced by `flake8-length`
  E501,
  # W505: "doc line too long", its function is replaced by `flake8-length`
  W505,
  # WPS300: "Found local folder import" -- nothing bad about this
  WPS300,
  # WPS322: "Found incorrect multi-line string" -- false-positives with
  # attribute docstrings. Ref:
  # https://github.com/wemake-services/wemake-python-styleguide/issues/3056
  WPS322,
  # WPS462: "Wrong multiline string usage" -- false-positives with
  # attribute docstrings. Ref:
  # https://github.com/wemake-services/wemake-python-styleguide/issues/3056
  WPS462,
  # WPS478: "Found non strict slice operation" -- needs investigation
  WPS478,

  # FIXME: These `flake8-annotations` errors need fixing and removal
  # ANN001: Missing type annotation for function argument 'argv'
  ANN001,
  # ANN002: Missing type annotation for *exceptions
  ANN002,
  # ANN003: Missing type annotation for **kwargs
  ANN003,
  # ANN101: Missing type annotation for self in method
  ANN101,
  # ANN102: Missing type annotation for cls in classmethod
  ANN102,
  # ANN201: Missing return type annotation for public function
  ANN201,
  # ANN202: Missing return type annotation for protected function
  ANN202,
  # ANN204: Missing return type annotation for special method
  ANN204,
  # ANN205: Missing return type annotation for staticmethod
  ANN205,
  # ANN206: Missing return type annotation for classmethod
  ANN206,

  # FIXME: These `flake8-spellcheck` errors need fixing and removal
  # SC100: Possibly misspelt word / comments
  SC100,
  # SC200: Possibly misspelt word / names
  SC200,

# 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.
# This is being flexibly extended through the `flake8-length`:
max-line-length = 79

# Allow certain violations in certain files:
# Please keep both sections of this list sorted, as it will be easier for others to find and add entries in the future
per-file-ignores =
  # The following ignores have been researched and should be considered permanent
  # each should be preceded with an explanation of each of the error codes
  # If other ignores are added for a specific file in the section following this,
  # these will need to be added to that line as well.

  # FIXME: toxfile is currently rather complicated, allowing these temporarily:
  # WPS202 Found too many module members: 8 > 7
  # WPS226 Found string literal over-use: %s%s> %s > 3
  toxfile.py: WPS202, WPS226

  # 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: These sneaked with lint updates sowehow, allowing these temporarily:
  # WPS226 Found string literal over-use: py > 3
  # WPS237 Found a too complex `f` string
  bin/pip_constraint_helpers.py: WPS226, WPS237

  # FIXME:
  cheroot/__init__.py: WPS412
  cheroot/__main__.py: WPS130
  cheroot/_compat.py: DAR101, DAR201, DAR301, DAR401, I003, RST304, WPS100, WPS111, WPS123, WPS226, WPS229, WPS420, WPS422, WPS432, WPS504, WPS505
  cheroot/cli.py: DAR101, DAR201, DAR401, I001, I004, I005, WPS100, WPS110, WPS120, WPS130, WPS202, WPS226, WPS229, WPS338, WPS420, WPS421
  cheroot/connections.py: DAR101, DAR201, DAR301, DAR401, I001, I003, I004, I005, RST304, S104, WPS100, WPS110, WPS111, WPS121, WPS122, WPS130, WPS201, WPS204, WPS210, WPS212, WPS214, WPS220, WPS229, WPS231, WPS301, WPS324, WPS338, WPS420, WPS421, WPS422, WPS432, WPS501, WPS504, WPS505
  cheroot/errors.py: DAR101, DAR201, I003, RST304, WPS111, WPS121, WPS422
  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, WPS338, WPS420, WPS422, WPS429, WPS431, WPS504, WPS604, WPS606
  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, WPS130, WPS132, WPS201, WPS202, WPS204, WPS210, WPS211, WPS212, WPS213, WPS214, WPS220, WPS221, WPS225, WPS226, WPS229, WPS230, WPS231, WPS236, WPS237, WPS238, WPS301, WPS338, WPS342, WPS410, WPS420, WPS421, WPS422, WPS429, WPS432, WPS504, WPS505, WPS601, WPS602, WPS608, WPS617
  cheroot/ssl/builtin.py: DAR101, DAR201, DAR401, I001, I003, N806, RST304, WPS110, WPS111, WPS115, WPS117, WPS120, WPS121, WPS122, WPS130, WPS201, WPS210, WPS214, WPS229, WPS231, WPS338, WPS422, WPS501, WPS505, 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, WPS301, WPS335, WPS338, WPS420, WPS422, WPS430, WPS432, WPS501, WPS504, WPS505, WPS601, WPS608, WPS615
  cheroot/test/conftest.py: DAR101, DAR201, DAR301, I001, I003, I005, WPS100, WPS130, WPS325, WPS354, WPS420, WPS422, WPS430, WPS457
  cheroot/test/helper.py: DAR101, DAR201, DAR401, I001, I003, I004, N802, WPS110, WPS111, WPS121, WPS201, WPS220, WPS231, WPS301, WPS414, WPS421, WPS422, WPS505
  cheroot/test/test_cli.py: DAR101, DAR201, I001, I005, N802, S101, S108, WPS110, WPS421, WPS431, WPS473
  cheroot/test/test_makefile.py: DAR101, DAR201, I004, RST304, S101, WPS110, WPS122
  cheroot/test/test_wsgi.py: DAR101, DAR301, I001, I004, S101, WPS110, WPS111, WPS117, WPS118, WPS121, WPS210, WPS421, WPS430, WPS432, WPS441, WPS509
  cheroot/test/test_core.py: C815, DAR101, DAR201, DAR401, I003, I004, N805, N806, S101, WPS110, WPS111, WPS114, WPS121, WPS202, WPS204, WPS226, WPS229, WPS324, WPS421, WPS422, WPS432, WPS602
  cheroot/test/test_dispatch.py: DAR101, DAR201, S101, WPS111, WPS121, 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, WPS235, WPS301, WPS324, WPS335, WPS336, WPS408, WPS420, WPS421, WPS422, WPS432, WPS441, WPS509, WPS608
  cheroot/test/test_server.py: DAR101, DAR201, DAR301, I001, I003, I004, I005, S101, WPS110, WPS111, WPS118, WPS121, WPS122, WPS130, WPS201, WPS202, WPS210, WPS218, WPS226, WPS229, WPS324, WPS421, WPS422, WPS430, WPS432, WPS473, WPS509, WPS608
  cheroot/test/test_conn.py: 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, WPS402, WPS420, WPS421, WPS422, WPS429, WPS430, WPS432, WPS435, WPS447, WPS504, WPS509, WPS602
  cheroot/test/webtest.py: 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, WPS237, WPS301, WPS338, WPS414, WPS420, WPS421, WPS422, WPS430, WPS432, WPS501, WPS505, WPS601
  cheroot/testing.py: C815, DAR101, DAR201, DAR301, I001, I003, S104, WPS100, WPS202, WPS211, WPS229, WPS301, WPS414, WPS420, WPS422, WPS430
  cheroot/workers/threadpool.py: DAR101, DAR201, E800, I001, I003, I004, RST201, RST203, RST301, WPS100, WPS110, WPS111, WPS121, WPS122, WPS210, WPS211, WPS214, WPS220, WPS229, WPS230, WPS231, WPS335, WPS338, WPS362, WPS363, WPS410, WPS414, WPS420, WPS422, WPS432, WPS501, WPS505, WPS601, WPS602, WPS617
  cheroot/wsgi.py: DAR101, DAR201, DAR401, I001, I003, I005, N801, RST201, RST301, WPS100, WPS110, WPS111, WPS114, WPS121, WPS122, WPS130, WPS210, WPS211, WPS226, WPS229, WPS231, WPS338, WPS420, WPS421, WPS422, WPS430, WPS501, WPS504, WPS602, WPS608
  cheroot/ssl/__init__.py: DAR101, DAR201, I003, WPS412, WPS422
  cheroot/test/_pytest_plugin.py: DAR101, I003, I004, WPS422
  cheroot/test/test__compat.py: DAR101, I001, I003, I005, WPS116, WPS226, WPS422, S101
  cheroot/test/test_errors.py: DAR101, WPS509, S101
  docs/conf.py: E800, I001, I004, WPS226, WPS301, WPS420, WPS453
  docs/scm_tag_titles_ext.py: DAR101, DAR201, DAR401, E800, I001, I004, N801, S404, S603, WPS210, WPS226, WPS301, 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

# ## Plugin-provided settings: ##

# 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

# wemake-python-styleguide
show-source = true
show-violation-links = true
