Please consider this code after running pylint:
''' Test ''' i = 0 while i < 4: myvar = i i = i + 1 pylint reports: Constant name "myvar" doesn't conform to UPPER_CASE naming style (invalid-name) But how much is myvar really a constant, when it obviously changes during the running process?
IIUC, it is not a false positive but rather myvar is regarded being a constant because it never changes during the iteration, and the next iteration the variable is regarded as "new". Did I understand it correctly?
MYVAR. I'd say it was a false positive, but that's opinion.