tonybaloney / perflint

Python Linter for performance anti patterns
MIT License
666 stars 10 forks source link

Dictionaries with dictionaries should not be called for for comprehension - W8403 #34

Open robinje opened 2 years ago

robinje commented 2 years ago

Using a for loop to generate a dictionary that has values of dictionaries should not be recommended for comprehension as it is not a valid use case.

for x in y: a = { x : {z : 'va'l}}