Skip to content

Commit 9015c56

Browse files
DimitriPapadopoulosmattip
authored andcommitted
Apply ruff/refurb rule FURB129
FURB129 Instead of calling `readlines()`, iterate over file object directly
1 parent cd15e05 commit 9015c56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testing/cffi1/test_commontypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def getlines():
99
'..', 'c', 'commontypes.c'))
1010
except OSError:
1111
pytest.skip("cannot find ../c/commontypes.c")
12-
lines = [line for line in f.readlines() if line.strip().startswith('EQ(')]
12+
lines = [line for line in f if line.strip().startswith('EQ(')]
1313
f.close()
1414
return lines
1515

0 commit comments

Comments
 (0)