From 75dff0bde0a4ff40d74a6a18d0a04523fb94a3dd Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 2 Nov 2023 20:06:16 +0100 Subject: [PATCH] Apply PERF --- cli/test/generate_test_db/main.py | 2 +- pyproject.toml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cli/test/generate_test_db/main.py b/cli/test/generate_test_db/main.py index d4049d2..2a5328d 100644 --- a/cli/test/generate_test_db/main.py +++ b/cli/test/generate_test_db/main.py @@ -109,7 +109,7 @@ def _generate_test_db(): add_part_student(student, be_2_ws_part) program_groups = {program: [] for program in programs} - for _semester, program_part_students in semester_program_part_students.items(): + for program_part_students in semester_program_part_students.values(): for program, part_students in program_part_students.items(): if len(part_students) % 2 == 1: # Add the first 3 students into a special group for an uneven number of students diff --git a/pyproject.toml b/pyproject.toml index f0d954d..620dc40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,8 +47,19 @@ select = [ "ERA", "PL", "NPY", + "PERF", +] +ignore = [ + "E5", + "S3", + "S6", + "RET504", + "PLR0912", + "PLR0915", + "PLW2901", + "PLR2004", + "PERF203", ] -ignore = ["E5", "S3", "S6", "RET504", "PLR0912", "PLR0915", "PLW2901", "PLR2004"] line-length = 120 [tool.ruff.per-file-ignores]