Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

msto
Copy link
Contributor

@msto msto commented Mar 16, 2024

#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

@msto msto changed the title fix: add missing properties to AlignedSegment interface fix: add missing properties to AlignedSegment type stubs Mar 17, 2024
@jmarshall
Copy link
Member

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.

@jmarshall jmarshall merged commit d32073b into pysam-developers:master Apr 19, 2024
@msto
Copy link
Contributor Author

msto commented Apr 19, 2024

Thanks @jmarshall !

jmarshall added a commit that referenced this pull request Oct 22, 2024
As each test is executed (thus verifying the actual code too), it invokes
typecheck(). This runs mypy on the function that invoked it, parses the
reveal_locals() output, and optionally checks that each local's hinted
type is the same as its actual runtime time. This is optional because
some tests require more nuanced checks; cf test_pileup_iterator_column()
in which pileup()'s runtime type is a subclass of the hinted type.

Add test cases for previously merged PRs #1273, #1296, and #1313.

Also fix some pysam/libcbcf.pyi type hints that caused these tests
to fail for unrelated reasons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants