Skip to content

Commit 83542c0

Browse files
Apply ruff/refurb rule FURB129
FURB129 Instead of calling `readlines()`, iterate over file object directly
1 parent 91bd477 commit 83542c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)