Skip to content

Commit

Permalink
chore: update type annotations for 3.10-12
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Aug 30, 2024
1 parent 4082981 commit 5509356
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/ga4gh/vrs/extras/vcf_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging
import pickle
from enum import Enum
from typing import Dict, List, Optional
from timeit import default_timer as timer

import click
Expand Down Expand Up @@ -110,7 +109,7 @@ class SeqRepoProxyType(str, Enum):
help="Require validation checks to pass in order to return a VRS object"
)
def annotate_click( # pylint: disable=too-many-arguments
vcf_in: str, vcf_out: Optional[str], vrs_pickle_out: Optional[str],
vcf_in: str, vcf_out: str | None, vrs_pickle_out: str | None,
vrs_attributes: bool, seqrepo_dp_type: SeqRepoProxyType, seqrepo_root_dir: str,
seqrepo_base_url: str, assembly: str, skip_ref: bool, require_validation: bool
) -> None:
Expand Down Expand Up @@ -175,8 +174,8 @@ def __init__(self, seqrepo_dp_type: SeqRepoProxyType = SeqRepoProxyType.LOCAL,

@use_ga4gh_compute_identifier_when(VrsObjectIdentifierIs.MISSING)
def annotate( # pylint: disable=too-many-arguments,too-many-locals
self, vcf_in: str, vcf_out: Optional[str] = None,
vrs_pickle_out: Optional[str] = None, vrs_attributes: bool = False,
self, vcf_in: str, vcf_out: str | None = None,
vrs_pickle_out: str | None = None, vrs_attributes: bool = False,
assembly: str = "GRCh38", compute_for_ref: bool = True,
require_validation: bool = True
) -> None:
Expand Down Expand Up @@ -273,8 +272,8 @@ def annotate( # pylint: disable=too-many-arguments,too-many-locals
pickle.dump(vrs_data, wf)

def _get_vrs_object( # pylint: disable=too-many-arguments,too-many-locals
self, vcf_coords: str, vrs_data: Dict, vrs_field_data: Dict, assembly: str,
vrs_data_key: Optional[str] = None, output_pickle: bool = True,
self, vcf_coords: str, vrs_data: dict, vrs_field_data: dict, assembly: str,
vrs_data_key: str | None = None, output_pickle: bool = True,
output_vcf: bool = False, vrs_attributes: bool = False,
require_validation: bool = True
) -> None:
Expand Down Expand Up @@ -352,11 +351,11 @@ def _get_vrs_object( # pylint: disable=too-many-arguments,too-many-locals
vrs_field_data[self.VRS_STATES_FIELD].append(alt)

def _get_vrs_data( # pylint: disable=too-many-arguments,too-many-locals
self, record: pysam.VariantRecord, vrs_data: Dict, assembly: str, # pylint: disable=no-member
additional_info_fields: List[str], vrs_attributes: bool = False,
self, record: pysam.VariantRecord, vrs_data: dict, assembly: str, # pylint: disable=no-member
additional_info_fields: list[str], vrs_attributes: bool = False,
output_pickle: bool = True, output_vcf: bool = True,
compute_for_ref: bool = True, require_validation: bool = True
) -> Dict:
) -> dict:
"""Get VRS data for record's reference and alt alleles.
:param pysam.VariantRecord record: A row in the VCF file
Expand Down

0 comments on commit 5509356

Please sign in to comment.