From fc7d9329da95c039e5d656c67b981459a248f40e Mon Sep 17 00:00:00 2001 From: Richard Si Date: Sat, 15 Nov 2025 11:01:48 -0500 Subject: [PATCH] Disable PERF ruff lint rules We aren't writing performance critical code here, and these lint rules are meant for users looking to micro-optimize their code (as said in the Ruff documentation). Sometimes, Ruff asks to transform for loops into comprehensions, worsening readability. --- pyproject.toml | 1 - src/pip/_internal/cli/parser.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 813300c26de..91f574a197b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -231,7 +231,6 @@ select = [ "G", "I", "ISC", - "PERF", "PIE810", "PLE", "PLR0", diff --git a/src/pip/_internal/cli/parser.py b/src/pip/_internal/cli/parser.py index 3905a91f2e1..9311824d750 100644 --- a/src/pip/_internal/cli/parser.py +++ b/src/pip/_internal/cli/parser.py @@ -189,7 +189,7 @@ def _get_ordered_configuration_items( name: [] for name in override_order } - for _, value in self.config.items(): # noqa: PERF102 + for _, value in self.config.items(): for section_key, val in value.items(): # ignore empty values if not val: