Skip to content

Commit

Permalink
resolve a few other places where !r is relevant.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Oct 24, 2024
1 parent ad20c6b commit 2226d1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packaging/specifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(self, spec: str = "", prereleases: bool | None = None) -> None:
"""
match = self._regex.search(spec)
if not match:
raise InvalidSpecifier(f"Invalid specifier: '{spec}'")
raise InvalidSpecifier(f"Invalid specifier: {spec!r}")

self._spec: tuple[str, str] = (
match.group("operator").strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def __init__(self, version: str) -> None:
# Validate the version and parse it into pieces
match = self._regex.search(version)
if not match:
raise InvalidVersion(f"Invalid version: '{version}'")
raise InvalidVersion(f"Invalid version: {version!r}")

# Store the parsed out pieces of the version
self._version = _Version(
Expand Down

0 comments on commit 2226d1a

Please sign in to comment.