Remove all "WPS" codes

This commit is contained in:
Alexander Hess 2026-11-28 02:01:12 +01:00
commit 9fcb3c8c14
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -187,7 +187,6 @@ select = [
# wemake-python-styleguide
# Source: https://wemake-python-stylegui.de/en/latest/pages/usage/violations/index.html
# ========================
"WPS1", "WPS2", "WPS3", "WPS4", "WPS5", "WPS6",
# darglint => docstring matches implementation
"DAR0", "DAR1", "DAR2", "DAR3", "DAR4", "DAR5",
# flake8-bandit => common security issues
@ -234,96 +233,36 @@ ignore = []
# If --ignore is passed on the command
# line, still ignore the following:
extend-ignore = [
# TODO: New in `wemake-python-styleguide` v0.15 - v0.17, revisit in the tooling goal
"WPS110",
"WPS237",
"WPS238",
"WPS358",
"WPS456",
"WPS458",
"WPS459",
"WPS462",
"WPS469",
# Too long line => duplicate with E501.
"B950",
# Comply with black's style.
# Source: https://github.com/psf/black/blob/master/docs/compatible_configs.md#flake8
"E203", "W503", "WPS348",
"E203", "W503",
# Let's not do `@pytest.mark.no_cover()` instead of `@pytest.mark.no_cover`.
"PT023",
# Google's Python Style Guide is not reStructuredText
# until after being processed by Sphinx Napoleon.
# Source: https://github.com/peterjc/flake8-rst-docstrings/issues/17
"RST201", "RST203", "RST210", "RST213", "RST301",
# The "too deep nesting" violation fires off "too early" and cannot be configured.
"WPS220",
# String constant over-use is checked visually by the programmer.
"WPS226",
# Function complexity is checked by `mccabe` (=C901),
# which yields the same result in most cases.
"WPS231",
# Modules as a whole are assumed to be not "too complex".
"WPS232",
# Allow underscores in numbers.
"WPS303",
# f-strings are ok.
"WPS305",
# Classes should not have to specify a base class.
"WPS306",
# Let's be modern: The Walrus is ok.
"WPS332",
# Let's not worry about the number of noqa's.
# Multi-line loops are ok.
"WPS352",
"WPS402",
# Putting logic into __init__.py files may be justified.
"WPS412",
# Allow multiple assignment, e.g., x = y = 123
"WPS429",
# There are no magic numbers.
"WPS432",
]
per-file-ignores = [
# Top-levels of a sub-packages are intended to import a lot.
"**/__init__.py:F401,WPS201",
# Allow shadowing built-ins and reading __*__ variables.
"docs/conf.py:WPS125,WPS609",
"**/__init__.py:F401",
# Type annotations are not strictly enforced.
"migrations/env.py:ANN0,ANN2",
# - ANN0, ANN2 => Type annotations are not strictly enforced.
# - S608 => Do not worry about SQL injection here.
# - WPS114, WPS118 => File names of revisions are ok.
# - WPS204, WPS213 => Revisions may have too many expressions.
"migrations/versions/*.py:ANN0,ANN2,S608,WPS114,WPS118,WPS204,WPS213",
# - ANN0, ANN2 => Type annotations are not strictly enforced.
# - WPS202 => TODO (isort): Check if still too many module members.
# - WPS213 => TODO (isort): Remove after simplifying the nox session "lint".
"noxfile.py:ANN0,ANN2,WPS202,WPS213",
# Allow upper case class variables within classes.
"src/velofy/configuration.py:WPS115",
# The module does not have too many imports.
"src/velofy/db/addresses_addresses.py:WPS201",
# The many noqa's are ok.
"src/velofy/forecasts/models/tactical/horizontal.py:WPS403",
# - S608 => No SQL injection as the inputs come from a safe source.
# - WPS403 => The many noqa's are ok.
"src/velofy/forecasts/timify.py:S608,WPS403",
"migrations/versions/*.py:ANN0,ANN2,S608",
# Type annotations are not strictly enforced.
"noxfile.py:ANN0,ANN2",
# No SQL injection as the inputs come from a safe source.
"src/velofy/forecasts/timify.py:S608",
# - ANN0, ANN2 => Type annotations are not strictly enforced.
# - D106 => The `Meta` class inside the factory_boy models do not need a docstring.
# - S101 => `assert` statements are ok in the test suite.
# - S311 => The `random` module is not used for cryptography.
# - WPS442 => Shadowing outer scopes occurs naturally with mocks.
# - WPS100 => `utils` should be a valid module name.
# - WPS118 => Test names may be longer than 40 characters.
# - WPS202, WPS204, WPS214 => Modules may have many test cases.
# - WPS221 => Do not check for Jones complexity in the test suite.
# - WPS338 => "Private" methods are really just a convention for
# fixtures without a return value.
# - WPS402 => We do not care about the number of "# noqa"s in the test suite.
# - WPS430 => Allow closures.
# - WPS437 => When testing, it is normal to use implementation details.
"tests/*.py:ANN0,ANN2,D106,S101,S311,WPS442,WPS100,WPS118,WPS202,WPS204,WPS214,WPS221,WPS338,WPS402,WPS430,WPS437",
"tests/*.py:ANN0,ANN2,D106,S101,S311",
]
# Explicitly set mccabe's maximum complexity to 10 as recommended by
@ -331,12 +270,6 @@ per-file-ignores = [
# Source: https://en.wikipedia.org/wiki/Cyclomatic_complexity#Limiting_complexity_during_development
max-complexity = 10
# Allow more than wemake-python-styleguide's 5 local variables per function.
max-local-variables = 8
# Allow more than wemake-python-styleguide's 7 methods per class.
max-methods = 15
# Comply with black's style.
# Source: https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length
max-line-length = 88
@ -344,18 +277,6 @@ max-line-length = 88
# Preview the code lines that cause errors.
show-source = true
# ===================================
# wemake-python-styleguide's settings
# ===================================
allowed-domain-names = [
"data",
"obj",
"param",
"result",
"results",
"value",
]
max-name-length = 40
# darglint
strictness = "long"
# flake8-docstrings