Closed akx closed 3 years ago
Just looking at whether a variable is being incremented in a loop isn't enough to consider enumerate().
enumerate()
This triggers SIM113 Use enumerate instead of 'line':
SIM113 Use enumerate instead of 'line'
for line in read_list(redis_conn, storage_key): line += b'\n' # ....
Thank you for reporting this! This seems easy to fix; I'll probably do it tomorrow evening :-)
Desired change
Explanation
Just looking at whether a variable is being incremented in a loop isn't enough to consider
enumerate()
.Example
This triggers
SIM113 Use enumerate instead of 'line'
: