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

fix: f-string in ga4gh_serialize_as_version #428

Merged
merged 1 commit into from
Jul 15, 2024
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
10 changes: 5 additions & 5 deletions src/ga4gh/vrs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def get_or_create_ga4gh_identifier(self, in_place='default', recompute=False, as

Digests will be recalculated even if present if recompute is True.

If 'as_version' is set to a version string, other parameters are
ignored and an identifier returned following the conventions of
If 'as_version' is set to a version string, other parameters are
ignored and an identifier returned following the conventions of
the VRS version indicated by 'as_version'.
"""
if as_version is not None:
Expand All @@ -286,9 +286,9 @@ def get_or_create_ga4gh_identifier(self, in_place='default', recompute=False, as

def compute_ga4gh_identifier(self, recompute=False, as_version=None):
"""Returns a GA4GH Computed Identifier.

If 'as_version' is set to a version string, other parameters are
ignored and a computed identifier returned following the conventions
ignored and a computed identifier returned following the conventions
of the VRS version indicated by 'as_version'.
"""
if as_version is None:
Expand Down Expand Up @@ -475,7 +475,7 @@ def ga4gh_serialize_as_version(self, as_version):
else:
raise ValueError(f'{value} is not int or list.')
out.append(result)
return f'{{"interval":{{"end":{out[1]},"start":{out[0]},"type":"SequenceInterval"}},"sequence_id":"{self.sequenceReference.refgetAccession.split('.')[1]}","type":"SequenceLocation"}}'
return f'{{"interval":{{"end":{out[1]},"start":{out[0]},"type":"SequenceInterval"}},"sequence_id":"{self.sequenceReference.refgetAccession.split(".")[1]}","type":"SequenceLocation"}}'
else:
raise ValueError(f'Serializing as version {as_version} not supported for this class.')

Expand Down
Loading