WPS111 too strict inside comprehensions
See original GitHub issueBug report
I think that WPS111 is too restrictive with vars that are only used in comprehension-like expressions.
What’s wrong
It says that s
is too short here:
[s.encode() for s in cythonize_args]
How is that should be
it doesn’t make sense for throwaway vars in list/dict/set comprehensions or generator expressions to be long.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Overusing list comprehensions and generator expressions in ...
Practice Python list comprehensions right now! Writing comprehensions with poor spacing. Critics of list comprehensions often say they're hard ...
Read more >5 Wrong Use Cases Of Python List Comprehensions
In either of the cases, picking list comprehensions just because it's fancy doesn't mean it's pythonic too. Let's consider the following example ...
Read more >How complex is too complex for a list comprehension? [closed]
List comprehensions are a very powerful tool in Python, but sometimes I find myself putting an awful lot of stuff inside of them....
Read more >When to Use a List Comprehension in Python
In this tutorial, you'll learn when to use a list comprehension in Python and how ... Some programmers even use them too much,...
Read more >Python List Comprehensions Are More Powerful Than You ...
In this example we build a generator inside list comprehension which is consumed by the outer loop. If you find this hard to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am going to decline this feature. I really don’t like short variable names. Sorry 😓
Related: