Skip to content

Commit

Permalink
add repr to RequiresPythonCandidate
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Feb 9, 2025
1 parent 2a3e2fd commit dad133e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pip/_internal/resolution/resolvelib/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,9 @@ def __init__(self, py_version_info: Optional[Tuple[int, ...]]) -> None:
def __str__(self) -> str:
return f"Python {self._version}"

def __repr__(self) -> str:
return f"{self.__class__.__name__}({self._version!r})"

@property
def project_name(self) -> NormalizedName:
return REQUIRES_PYTHON_IDENTIFIER
Expand Down

0 comments on commit dad133e

Please sign in to comment.