Skip to content

Commit 999d5fd

Browse files
DimitriPapadopoulosadrienverge
authored andcommitted
style: Apply ruff/flake8-simplify rule SIM110
SIM110 Use `return any(...)` instead of `for` loop
1 parent 16430e9 commit 999d5fd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,7 @@ def built_in_equivalent_of_test_codec(test_codec):
112112

113113

114114
def uses_bom(codec):
115-
for suffix in ('_32', '_16', '_sig'):
116-
if codec.endswith(suffix):
117-
return True
118-
return False
115+
return any(codec.endswith(suffix) for suffix in ('_32', '_16', '_sig'))
119116

120117

121118
def encoding_detectable(string, codec):

0 commit comments

Comments
 (0)