From 9a358fa289e87b849d08ead61a6dccabf5961121 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:12:32 +0200 Subject: [PATCH] PERF402 and fixes --- Tests/test_file_container.py | 4 +--- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/test_file_container.py b/Tests/test_file_container.py index 597ab5083..c73f2a40c 100644 --- a/Tests/test_file_container.py +++ b/Tests/test_file_container.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index ea43e9cb1..149dbbac5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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