Skip to content

Add type annotations to snp_data.py (AnophelesSnpData) #1221

@Yashsingh045

Description

@Yashsingh045

Problem

malariagen_data/anoph/snp_data.py has an explicit TODO at line 70:
# TODO review type annotations here, maybe can tighten

The file is 2000+ lines and many public methods lack precise return type annotations and parameter types, which limits IDE support and static analysis.

Proposed Fix

  • Add return type annotations to public methods (snp_calls, snp_allele_counts, snp_variants, etc.).
  • Tighten parameter types using base_params type aliases where applicable.
  • Review and tighten internal cache type annotations as suggested in the TODO.

Impact

Better developer experience, improved IDE autocomplete, and catching potential bugs via static analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions