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

Testing: Add type annotations to version.py #6594

Merged
merged 1 commit into from Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/rucio/version.py
Expand Up @@ -25,21 +25,21 @@
FINAL = VERSION_INFO['final'] # This becomes true at Release Candidate time


def canonical_version_string():
def canonical_version_string() -> str:
""" Get the canonical string """
return '.'.join(filter(None, RUCIO_VERSION))


def version_string():
def version_string() -> str:
""" Get the version string """
return canonical_version_string()


def vcs_version_string():
def vcs_version_string() -> str:
""" Get the VCS version string """
return "%s:%s" % (VERSION_INFO['branch_nick'], VERSION_INFO['revision_id'])


def version_string_with_vcs():
def version_string_with_vcs() -> str:
""" Get the version string with VCS """
return "%s-%s" % (canonical_version_string(), vcs_version_string())