PERF402 and fixes

This commit is contained in:
Hugo van Kemenade 2026-03-26 18:12:32 +02:00
parent b85b8534d7
commit 9a358fa289
2 changed files with 2 additions and 3 deletions

View File

@ -179,9 +179,7 @@ def test_iter(bytesmode: bool) -> None:
container = ContainerIO.ContainerIO(fh, 0, 120)
# Act
data = []
for line in container:
data.append(line)
data = list(container)
# Assert
if bytesmode:

View File

@ -149,6 +149,7 @@ lint.select = [
"PERF101", # perflint: unnecessary-list-cast
"PERF102", # perflint: incorrect-dict-iterator
"PERF401", # perflint: manual-list-comprehension
"PERF402", # perflint: manual-list-copy
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PT", # flake8-pytest-style