Skip to content

Commit 3d6b0be

Browse files
committed
Remove outdated noqa comments
1 parent 4b0e7e5 commit 3d6b0be

File tree

8 files changed

+10
-11
lines changed

8 files changed

+10
-11
lines changed

news/80291DF4-7B0F-4268-B682-E1FCA1C3ACED.trivial.rst

Whitespace-only changes.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ select = [
101101
"PLE",
102102
"PLR0",
103103
"W",
104+
"RUF100",
104105
]
105106

106107
[tool.ruff.isort]

src/pip/_internal/cli/cmdoptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ def _handle_config_settings(
826826
) -> None:
827827
key, sep, val = value.partition("=")
828828
if sep != "=":
829-
parser.error(f"Arguments to {opt_str} must be of the form KEY=VAL") # noqa
829+
parser.error(f"Arguments to {opt_str} must be of the form KEY=VAL")
830830
dest = getattr(parser.values, option.dest)
831831
if dest is None:
832832
dest = {}
@@ -921,13 +921,13 @@ def _handle_merge_hash(
921921
algo, digest = value.split(":", 1)
922922
except ValueError:
923923
parser.error(
924-
"Arguments to {} must be a hash name " # noqa
924+
"Arguments to {} must be a hash name "
925925
"followed by a value, like --hash=sha256:"
926926
"abcde...".format(opt_str)
927927
)
928928
if algo not in STRONG_HASHES:
929929
parser.error(
930-
"Allowed hash algorithms for {} are {}.".format( # noqa
930+
"Allowed hash algorithms for {} are {}.".format(
931931
opt_str, ", ".join(STRONG_HASHES)
932932
)
933933
)

src/pip/_internal/cli/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def _update_defaults(self, defaults: Dict[str, Any]) -> Dict[str, Any]:
229229
val = strtobool(val)
230230
except ValueError:
231231
self.error(
232-
"{} is not a valid value for {} option, " # noqa
232+
"{} is not a valid value for {} option, "
233233
"please specify a boolean value like yes/no, "
234234
"true/false or 1/0 instead.".format(val, key)
235235
)
@@ -240,7 +240,7 @@ def _update_defaults(self, defaults: Dict[str, Any]) -> Dict[str, Any]:
240240
val = int(val)
241241
if not isinstance(val, int) or val < 0:
242242
self.error(
243-
"{} is not a valid value for {} option, " # noqa
243+
"{} is not a valid value for {} option, "
244244
"please instead specify either a non-negative integer "
245245
"or a boolean value like yes/no or false/true "
246246
"which is equivalent to 1/0.".format(val, key)

src/pip/_internal/commands/debug.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ def show_tags(options: Values) -> None:
134134

135135

136136
def ca_bundle_info(config: Configuration) -> str:
137-
# Ruff misidentifies config as a dict.
138-
# Configuration does not have support the mapping interface.
139-
levels = {key.split(".", 1)[0] for key, _ in config.items()} # noqa: PERF102
137+
levels = {key.split(".", 1)[0] for key, _ in config.items()}
140138
if not levels:
141139
return "Not specified"
142140

src/pip/_internal/commands/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def run(self, options: Values, args: List[str]) -> int:
501501
show_traceback,
502502
options.use_user_site,
503503
)
504-
logger.error(message, exc_info=show_traceback) # noqa
504+
logger.error(message, exc_info=show_traceback)
505505

506506
return ERROR
507507

tests/functional/test_install_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
PipTestEnvironment,
1212
TestData,
1313
assert_all_changes,
14-
pyversion, # noqa: F401
14+
pyversion,
1515
)
1616

1717

tests/functional/test_wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from tests.lib import (
1111
PipTestEnvironment,
1212
TestData,
13-
pyversion, # noqa: F401
13+
pyversion,
1414
)
1515

1616

0 commit comments

Comments
 (0)