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

Simplify call sig uses None for filter_XX args #2609

Merged
merged 1 commit into from Oct 31, 2022

Conversation

hyanwong
Copy link
Member

Fixes #2608

I presume this doesn't need extra tests. Does it require an addition to the changelog?

@jeromekelleher
Copy link
Member

I think this is potentially breaking, if people were depending on the Falsey interpretation of None? Although maybe not,as the Python C layer is probably interpreting these as ints and so it wouldn't allow None as a parameter.

Good to double-check this and document the new behaviour in the CHANGELOG in any case.

@hyanwong
Copy link
Member Author

Previously passing None resulted in

TypeError: an integer is required (got type NoneType)

Test added which now passes when None is provided

@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Merging #2609 (9f31282) into main (3d6ea1b) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2609      +/-   ##
==========================================
- Coverage   93.95%   93.89%   -0.06%     
==========================================
  Files          27       27              
  Lines       27446    27621     +175     
  Branches     1266     1269       +3     
==========================================
+ Hits        25786    25935     +149     
- Misses       1622     1648      +26     
  Partials       38       38              
Flag Coverage Δ
c-tests 92.25% <ø> (+0.01%) ⬆️
lwt-tests 89.05% <ø> (ø)
python-c-tests 72.21% <100.00%> (+0.12%) ⬆️
python-tests 98.93% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
python/tskit/trees.py 98.75% <ø> (ø)
python/tskit/tables.py 98.96% <100.00%> (+<0.01%) ⬆️
python/_tskitmodule.c 92.69% <0.00%> (-0.23%) ⬇️
c/tskit/haplotype_matching.c 95.09% <0.00%> (+0.01%) ⬆️
c/tskit/tables.c 90.23% <0.00%> (+0.01%) ⬆️
c/tskit/stats.c 93.25% <0.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d6ea1b...9f31282. Read the comment docs.

Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jeromekelleher jeromekelleher added the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Oct 31, 2022
@mergify mergify bot merged commit 10a74b4 into tskit-dev:main Oct 31, 2022
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Oct 31, 2022
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.

Switch filter_X arguments in simplify to default None treated as True.
2 participants