wemake-python-styleguide icon indicating copy to clipboard operation
wemake-python-styleguide copied to clipboard

WSP111 is very strict for list compreh

Open FyZzyss opened this issue 3 years ago • 0 comments

What's wrong

Hi! You have a very good plugin! I fell in love with it at first sight, but your uncooperative approach to https://github.com/wemake-services/wemake-python-styleguide/issues/1321 it's frustrating. I think it would be possible to specify a parameter whether to check a variable in a loop whose default value is True or the number of rows that the loop occupies when it is not necessary to check the length of the variable. Thanks!

How it should be

it doesn't make sense for throwaway vars in list/dict/set comprehensions or generator expressions to be long.

Flake8 version and plugins

{ "dependencies": [], "platform": { "python_implementation": "CPython", "python_version": "3.10.4", "system": "Darwin" }, "plugins": [ { "is_local": false, "plugin": "flake8-annotations", "version": "2.9.0" }, { "is_local": false, "plugin": "flake8-bandit", "version": "3.0.0" }, { "is_local": false, "plugin": "flake8-broken-line", "version": "0.4.0" }, { "is_local": false, "plugin": "flake8-bugbear", "version": "22.7.1" }, { "is_local": false, "plugin": "flake8-comprehensions", "version": "3.10.0" }, { "is_local": false, "plugin": "flake8-darglint", "version": "1.8.1" }, { "is_local": false, "plugin": "flake8-debugger", "version": "4.1.2" }, { "is_local": false, "plugin": "flake8-docstrings", "version": "1.6.0, pydocstyle: 6.1.1" }, { "is_local": false, "plugin": "flake8-eradicate", "version": "1.2.1" }, { "is_local": false, "plugin": "flake8-string-format", "version": "0.3.0" }, { "is_local": false, "plugin": "flake8_commas", "version": "2.1.0" }, { "is_local": false, "plugin": "flake8_isort", "version": "4.1.2.post0" }, { "is_local": false, "plugin": "flake8_quotes", "version": "3.3.1" }, { "is_local": false, "plugin": "flake8_simplify", "version": "0.19.3" }, { "is_local": false, "plugin": "mccabe", "version": "0.6.1" }, { "is_local": false, "plugin": "naming", "version": "0.12.1" }, { "is_local": false, "plugin": "pycodestyle", "version": "2.8.0" }, { "is_local": false, "plugin": "pyflakes", "version": "2.4.0" }, { "is_local": false, "plugin": "pylint", "version": "0.0.0" }, { "is_local": false, "plugin": "rst-docstrings", "version": "0.2.7" }, { "is_local": false, "plugin": "wemake_python_styleguide", "version": "0.16.1" } ], "version": "4.0.1" }

pip information

pip 22.0.4 (python 3.10)

OS information

MacOS

FyZzyss avatar Aug 01 '22 11:08 FyZzyss