diff --git a/src/ga4gh/vrs/extras/vcf_annotation.py b/src/ga4gh/vrs/extras/vcf_annotation.py index d0748bdf..0d413175 100644 --- a/src/ga4gh/vrs/extras/vcf_annotation.py +++ b/src/ga4gh/vrs/extras/vcf_annotation.py @@ -28,7 +28,7 @@ _logger.setLevel(logging.DEBUG) -class VCFAnnotatorException(Exception): # noqa: N818 +class VCFAnnotatorError(Exception): """Custom exceptions for VCF Annotator tool""" @@ -291,7 +291,7 @@ def annotate( """ if not any((vcf_out, vrs_pickle_out)): msg = "Must provide one of: `vcf_out` or `vrs_pickle_out`" - raise VCFAnnotatorException(msg) + raise VCFAnnotatorError(msg) info_field_num = "R" if compute_for_ref else "A" info_field_desc = "REF and ALT" if compute_for_ref else "ALT" diff --git a/tests/extras/test_vcf_annotation.py b/tests/extras/test_vcf_annotation.py index fd034b0b..dc1e7ecf 100644 --- a/tests/extras/test_vcf_annotation.py +++ b/tests/extras/test_vcf_annotation.py @@ -7,7 +7,7 @@ import pytest from ga4gh.vrs.dataproxy import DataProxyValidationError -from ga4gh.vrs.extras.vcf_annotation import VCFAnnotator, VCFAnnotatorException +from ga4gh.vrs.extras.vcf_annotation import VCFAnnotator, VCFAnnotatorError TEST_DATA_DIR = "tests/extras/data" @@ -160,7 +160,7 @@ def test_annotate_vcf_vcf_only(vcf_annotator, vcr_cassette): def test_annotate_vcf_input_validation(vcf_annotator): input_vcf = f"{TEST_DATA_DIR}/test_vcf_input.vcf" - with pytest.raises(VCFAnnotatorException) as e: + with pytest.raises(VCFAnnotatorError) as e: vcf_annotator.annotate(input_vcf) assert str(e.value) == "Must provide one of: `vcf_out` or `vrs_pickle_out`"