Skip to content

Commit 97f35e8

Browse files
committed
Replace range function by enumerate
1 parent 5277fca commit 97f35e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

msgcheck/po.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def check_whitespace_eol(self):
239239
strlines = mstr.split('\n')
240240
if len(idlines) < 2 or len(idlines) != len(strlines):
241241
continue
242-
for i in range(0, len(idlines)):
243-
endin = len(idlines[i]) - len(idlines[i].rstrip(' '))
242+
for i, idline in enumerate(idlines):
243+
endin = len(idline) - len(idline.rstrip(' '))
244244
endout = len(strlines[i]) - len(strlines[i].rstrip(' '))
245245
if (endin > 0 or endout > 0) and endin != endout:
246246
errors.append(

0 commit comments

Comments
 (0)