Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPS434 false positive when unpacking #3029

Open
Xoriun opened this issue Aug 6, 2024 · 0 comments
Open

WPS434 false positive when unpacking #3029

Xoriun opened this issue Aug 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Xoriun
Copy link

Xoriun commented Aug 6, 2024

What's wrong

Unpacking raises a WPS434 exactly when the first variable is the same as the one unpacking from

a, b = a  # raises 434
c, d = d  # ok

How it should be

In my opinion, none of these should raise WPS434, since the content of a and d clearly change.

Flake8 version and plugins

{
"platform": {
"python_implementation": "CPython",
"python_version": "3.12.3",
"system": "Windows"
},
"plugins": [
{
"plugin": "flake8-bandit",
"version": "4.1.1"
},
{
"plugin": "flake8-broken-line",
"version": "1.0.0"
},
{
"plugin": "flake8-bugbear",
"version": "24.4.26"
},
{
"plugin": "flake8-commas",
"version": "2.1.0"
},
{
"plugin": "flake8-comprehensions",
"version": "3.15.0"
},
{
"plugin": "flake8-debugger",
"version": "4.1.2"
},
{
"plugin": "flake8-docstrings",
"version": "1.7.0"
},
{
"plugin": "flake8-docstrings-complete",
"version": "1.3.0"
},
{
"plugin": "flake8-eradicate",
"version": "1.5.0"
},
{
"plugin": "flake8-isort",
"version": "6.1.1"
},
{
"plugin": "flake8-quotes",
"version": "3.4.0"
},
{
"plugin": "flake8-rst-docstrings",
"version": "0.3.0"
},
{
"plugin": "flake8-string-format",
"version": "0.3.0"
},
{
"plugin": "mccabe",
"version": "0.7.0"
},
{
"plugin": "pep8-naming",
"version": "0.13.3"
},
{
"plugin": "pycodestyle",
"version": "2.12.0"
},
{
"plugin": "pyflakes",
"version": "3.2.0"
},
{
"plugin": "wemake-python-styleguide",
"version": "0.19.2"
}
],
"version": "7.1.0"
}

pip information

pip 24.1.2 from C:[]\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
aiofiles==24.1.0
aiohttp==3.9.5
aiosignal==1.3.1
altgraph==0.17.4
anyio==4.4.0
astor==0.8.1
attrs==23.2.0
auto-py-to-exe==2.44.1
Babel==2.15.0
bandit==1.7.9
bottle==0.12.25
bottle-websocket==0.2.9
certifi==2024.7.4
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
ci-info==0.3.0
click==8.1.7
colorama==0.4.6
configobj==5.0.8
configparser==7.0.0
docutils==0.21.2
Eel==0.16.0
eradicate==2.3.0
etelemetry==0.3.1
filelock==3.15.4
fitz==0.0.1.dev2
flake8==7.1.0
flake8-bandit==4.1.1
flake8-broken-line==1.0.0
flake8-bugbear==24.4.26
flake8-commas==2.1.0
flake8-comprehensions==3.15.0
flake8-debugger==4.1.2
flake8-docstrings==1.7.0
flake8-docstrings-complete==1.3.0
flake8-eradicate==1.5.0
flake8-isort==6.1.1
flake8-quotes==3.4.0
flake8-rst-docstrings==0.3.0
flake8-string-format==0.3.0
frontend==0.0.3
frozenlist==1.4.1
future==1.0.0
gevent==24.2.1
gevent-websocket==0.10.1
greenlet==3.0.3
h11==0.14.0
httplib2==0.22.0
idna==3.7
iso8601==2.1.0
isodate==0.6.1
isort==5.13.2
itsdangerous==2.2.0
looseversion==1.3.0
lxml==5.2.2
markdown-it-py==3.0.0
mccabe==0.7.0
mdurl==0.1.2
multidict==6.0.5
networkx==3.3
nibabel==5.2.1
nipype==1.8.6
numpy==2.0.0
packaging==24.1
pandas==2.2.2
pathlib==1.0.1
pbr==6.0.0
pefile==2023.2.7
pep8-naming==0.13.3
pillow==10.4.0
prov==2.0.1
py-cord==2.6.0
pyasn1==0.6.0
pycodestyle==2.12.0
pycparser==2.22
pydocstyle==6.3.0
pydot==2.0.0
pyflakes==3.2.0
Pygments==2.18.0
pyinstaller==6.8.0
pyinstaller-hooks-contrib==2024.7
PyMuPDF==1.24.7
PyMuPDFb==1.24.6
pyparsing==3.1.2
pypdfium2==4.30.0
pyserial==3.5
PySimpleGUI==5.0.6
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32-ctypes==0.2.2
pyxnat==1.6.2
PyYAML==6.0.1
rdflib==6.3.2
reportlab==4.2.2
requests==2.32.3
restructuredtext-lint==1.4.0
rich==13.7.1
rsa==4.9
scipy==1.14.0
setuptools==70.2.0
simplejson==3.19.2
six==1.16.0
sniffio==1.3.1
snowballstemmer==2.2.0
starlette==0.37.2
stevedore==5.2.0
traits==6.4.3
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
uvicorn==0.30.1
wemake-python-styleguide==0.19.2
whichcraft==0.6.1
yarl==1.9.4
zope.event==5.0
zope.interface==6.4.post2

OS information

Windows 10

@Xoriun Xoriun added the bug Something isn't working label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant