From 8cc4bb89fc68bfa940ea0fa6a813b0550df32308 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 30 Nov 2025 15:06:10 +0100 Subject: [PATCH] Enable PERF203: add per-file-ignores for intentional try-except-in-loop patterns --- pyproject.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81749f9..504b02a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,6 @@ ignore = [ "FBT003", # Boolean positional value - common pattern "ARG001", # Unused function argument - often needed for API compatibility "ARG002", # Unused method argument - often needed for API compatibility - "PERF203", # try-except-in-loop - often necessary "PGH003", # blanket-type-ignore - existing code "PLC0415", # import-outside-top-level - sometimes necessary "N816", # mixed-case-variable-in-global-scope - often constants @@ -110,6 +109,15 @@ unfixable = [] "poker-modifier-app/*.py" = [ "INP001", # Folder has hyphen, can't be a valid Python package ] +"PYTHON/downloadCats/generate_cats.py" = [ + "PERF203", # Try-except needed for download resilience in loop +] +"PYTHON/lichess_bot/main.py" = [ + "PERF203", # Try-except needed for stream/move error handling in loops +] +"PYTHON/randomize_numbers/random_digits.py" = [ + "PERF203", # Try-except needed for parsing user input in loop +] [tool.ruff.lint.pydocstyle] convention = "google" # Use Google docstring convention