Skip to content

Return empty list from entries() and free the overlap object - #167

Merged
dpryan79 merged 1 commit into
deeptools:masterfrom
barlowa124:fix-entries-empty-149
Oct 11, 2026
Merged

dpryan79 merged 1 commit into
deeptools:masterfrom
barlowa124:fix-entries-empty-149

Conversation

@barlowa124

Copy link
Copy Markdown
Contributor

Closes #149.

BBFile.entries() returned None when a query overlaps nothing.
Iterating that result raises TypeError, and the early return also
skipped bbDestroyOverlappingEntries, leaking the overlap struct.

values() in the same class already returns [] for empty
results, and testBigBed asserts that convention. entries() now
returns [] as well, and the overlap object is destroyed on the
empty path.

testBigBed gains a case querying a region with no entries in the
bundled test.bigBed: it asserts [] and iterates the result.
Populated regions still return tuples with the interval strings.
The test module passes locally.

…s#149)

The early return for a zero-entry overlap result returned Py_None,
which is not iterable and also leaked the result structure. Return
PyList_New(0) instead so entries() is safe to use directly in loops
and comprehensions, matching values() which already returns [] on
empty queries.
@dpryan79
dpryan79 merged commit 1cb32a6 into deeptools:master Oct 11, 2026
2 checks passed
barlowa124 added a commit to barlowa124/barlowa124 that referenced this pull request Oct 20, 2026
…un oncology ledger

- Record newly merged upstream PRs: rdkit#9670, rdkit#9674, openmm#5487,
  deeptools/pyBigWig#167, sgkit-dev/sgkit#1353, hgrecco/pint#2474,
  and openmc-dev/openmc#4188
- Add ailm-inspectable to the Trustworthy ML and scientific agents table
- Update oncology-coscientist summary with the 68-run ledger and 2x3
  Qwen2.5-3B/14B sweep
- Add .gitignore for local untracked notes

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

pyBigWig.entries() should return empty array, not None when no entries are found

2 participants