Skip to content

Commit 9a358fa

Browse files
committed
PERF402 and fixes
1 parent b85b853 commit 9a358fa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Tests/test_file_container.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,7 @@ def test_iter(bytesmode: bool) -> None:
179179
container = ContainerIO.ContainerIO(fh, 0, 120)
180180

181181
# Act
182-
data = []
183-
for line in container:
184-
data.append(line)
182+
data = list(container)
185183

186184
# Assert
187185
if bytesmode:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ lint.select = [
149149
"PERF101", # perflint: unnecessary-list-cast
150150
"PERF102", # perflint: incorrect-dict-iterator
151151
"PERF401", # perflint: manual-list-comprehension
152+
"PERF402", # perflint: manual-list-copy
152153
"PGH", # pygrep-hooks
153154
"PIE", # flake8-pie
154155
"PT", # flake8-pytest-style

0 commit comments

Comments
 (0)