Skip to content

WPS476 in for defenition #3360

@LordGvozd

Description

@LordGvozd

What's wrong

for value in await smth_awaitable: causes a WPS476

How it should be

for value in await smth_awaitable: dont causes a WPS476. WPS476 should be only in loop body?

Flake8 version and plugins

{
"platform": {
"python_implementation": "CPython",
"python_version": "3.13.1",
"system": "Linux"
},
"plugins": [
{
"plugin": "mccabe",
"version": "0.7.0"
},
{
"plugin": "pycodestyle",
"version": "2.12.1"
},
{
"plugin": "pyflakes",
"version": "3.2.0"
},
{
"plugin": "wemake-python-styleguide",
"version": "1.1.0"
}
],
"version": "7.1.2"
}

pip information

pip 24.3.1 from /home/LordGvozd/Dev/returns/.venv/lib/python3.13/site-packages/pip (python 3.13)
anyio==4.9.0
attrs==25.3.0
build==1.2.2.post1
CacheControl==0.14.2
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
cleo==2.1.0
click==8.1.8
codespell==2.4.1
covdefaults==2.3.0
coverage==7.7.0
crashtest==0.4.1
cryptography==44.0.2
decorator==5.2.1
distlib==0.3.9
dulwich==0.22.8
fastjsonschema==2.21.1
filelock==3.18.0
findpython==0.6.3
flake8==7.1.2
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
hypothesis==6.130.4
idna==3.10
iniconfig==2.1.0
installer==0.7.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
Jinja2==3.1.6
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
keyring==25.6.0
MarkupSafe==3.0.2
mccabe==0.7.0
more-itertools==10.6.0
msgpack==1.1.0
mypy==1.15.0
mypy-extensions==1.0.0
outcome==1.3.0.post0
packaging==24.2
pbs-installer==2025.3.17
pkginfo==1.12.1.2
platformdirs==4.3.7
pluggy==1.5.0
poetry==2.1.1
poetry-core==2.1.1
pycodestyle==2.12.1
pycparser==2.22
pyflakes==3.2.0
Pygments==2.19.1
pyproject_hooks==1.2.0
pytest==8.3.5
pytest-cov==6.0.0
pytest-mypy-plugins==3.2.0
pytest-randomly==3.16.0
pytest-shard==0.1.2
pytest-subtests==0.14.1
PyYAML==6.0.2
RapidFuzz==3.12.2
referencing==0.36.2
regex==2024.11.6
requests==2.32.3
requests-toolbelt==1.0.0
-e git+https://github.com/LordGvozd/returns.git@39f539f99bf510f8682bff026a84dbd4f3963784#egg=returns
rpds-py==0.23.1
ruff==0.11.2
SecretStorage==3.3.3
shellingham==1.5.4
slotscheck==0.19.1
sniffio==1.3.1
sortedcontainers==2.4.0
tomlkit==0.13.2
trio==0.29.0
trove-classifiers==2025.3.19.19
typing_extensions==4.12.2
urllib3==2.3.0
virtualenv==20.29.3
wemake-python-styleguide==1.1.0
zstandard==0.23.0

OS information

Linux archlinux 6.12.8-arch1-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions