pysam-developers / pysam

Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
https://pysam.readthedocs.io/en/latest/
MIT License
773 stars 274 forks source link

fix: add missing properties to AlignedSegment type stubs #1273

Closed msto closed 4 months ago

msto commented 5 months ago

https://github.com/pysam-developers/pysam/pull/1088 added is_mapped and is_forward (and their mate equivalents) to the AlignedSegment API, but didn't declare these properties in the corresponding type stubs. Their absence here causes downstream woes with mypy's type checking

jmarshall commented 4 months ago

These were added while the type hints PR #1008 was still in flight. So it is more that the latter was (understandably) not updated with additions on master before it was itself merged.

In any case, thanks for the useful contribution. I've checked for other additions while the type hints were gestating — there were two, and I've added type stubs for them to your branch.

msto commented 4 months ago

Thanks @jmarshall !