Skip to content

Commit 9c66f5c

Browse files
authored
Remove extraneous quotes in f-strings by using !r (#848)
1 parent 4dc334c commit 9c66f5c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/packaging/specifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def __init__(self, spec: str = "", prereleases: bool | None = None) -> None:
234234
"""
235235
match = self._regex.search(spec)
236236
if not match:
237-
raise InvalidSpecifier(f"Invalid specifier: '{spec}'")
237+
raise InvalidSpecifier(f"Invalid specifier: {spec!r}")
238238

239239
self._spec: tuple[str, str] = (
240240
match.group("operator").strip(),

src/packaging/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def parse_wheel_filename(
125125
build_match = _build_tag_regex.match(build_part)
126126
if build_match is None:
127127
raise InvalidWheelFilename(
128-
f"Invalid build number: {build_part} in '{filename!r}'"
128+
f"Invalid build number: {build_part} in {filename!r}"
129129
)
130130
build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
131131
else:

src/packaging/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def __init__(self, version: str) -> None:
199199
# Validate the version and parse it into pieces
200200
match = self._regex.search(version)
201201
if not match:
202-
raise InvalidVersion(f"Invalid version: '{version}'")
202+
raise InvalidVersion(f"Invalid version: {version!r}")
203203

204204
# Store the parsed out pieces of the version
205205
self._version = _Version(

0 commit comments

Comments
 (0)