Skip to content

Commit

Permalink
Add: Implement repr for Version classes
Browse files Browse the repository at this point in the history
This is required for debugging version classes especially failing tests.
  • Loading branch information
bjoernricks authored and y0urself committed Mar 14, 2023
1 parent 2c6ca13 commit e1ab500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pontos/version/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def __ne__(self, other: Any) -> bool:
def __str__(self) -> str:
"""A string representation of the version"""

def __repr__(self) -> str:
"""A representation of the Version"""
return f"<{self.__class__.__name__}('{self}')>"


ParseVersionFuncType = Callable[[str], Version]

Expand Down

0 comments on commit e1ab500

Please sign in to comment.