Skip to content

Commit ed504f0

Browse files
committed
ruff
1 parent a2752a2 commit ed504f0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ga4gh/vrs/extras/translator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,15 @@ def _to_gnomad(
438438
If `namespace` is not None, returns gnomAD strings for the
439439
specified namespace if applicable, or throws ValueError if not.
440440
441-
If `namespace` is None, returns gnomAD strings based oof of the
441+
If `namespace` is None, returns gnomAD strings based off of the
442442
`default_assembly_name`.
443443
444444
If the VRS object cannot be expressed in gnomAD-style, raises ValueError.
445445
"""
446446
namespace = namespace or self.default_assembly_name
447-
if not namespace.startswith('GRCh'):
448-
raise ValueError(f"gnomAD-style identifiers require a GRCh reference sequence namespace, but got '{namespace}'")
447+
if not namespace.startswith("GRCh"):
448+
error = f"Invalid gnomAD-style namespace '{namespace}'"
449+
raise ValueError(error)
449450
return self._to_location_expression(
450451
"{alias}-{start}-{ref_seq}-{alt_seq}", vo, namespace,
451452
)

0 commit comments

Comments
 (0)