Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct get_reference_length type hint #1313

Merged

Conversation

msto
Copy link
Contributor

@msto msto commented Oct 17, 2024

reference is typed as an int but should be typed as a str.

The first line of the function converts the passed reference name to the corresponding tid.

def get_reference_length(self, reference):
cdef int tid = self.get_tid(reference)

@jmarshall jmarshall merged commit cdd962c into pysam-developers:master Oct 17, 2024
12 checks passed
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