Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add string representation for GetiVersion #217

Merged
merged 2 commits into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions geti_sdk/platform_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ def __eq__(self, other):
)
return self.version == other.version

def __str__(self) -> str:
"""
Return the Intel Geti version as a string

:return: String containing the version
"""
return f"{self.version}-{self.build_tag}-{self.time_tag}"

def __repr__(self) -> str:
"""
Return the string representation of the Intel Geti version

:return: String representing the version
"""
return f"GetiVersion({self.version}-{self.build_tag}-{self.time_tag})"

@property
def is_sc_mvp(self) -> bool:
"""
Expand Down
Loading