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

test_unbound_args: add a functionality to ignore specific methods #316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arnaud-ma
Copy link

@arnaud-ma arnaud-ma commented Jan 8, 2025

With this PR, it is now possible to ignore some methods, given their signature. For example, taking the false positive in #86:

module abcd

f(::NTuple{N, T}) where {N,T} = (N,T)
f(::Tuple{}) = (0,Any)

end # module

It is possible to disable the false positive with:

Aqua.test_unbound_args(abcd, ignore = [(abcd.f, NTuple)])

This specific example has been added in the unit tests.

To improve flexibility, the possibility to call directly Aqua.test_unbound_args(unbounds_args) where unbounds_args is a collection of methods (probably got with Test.detect_unbound_args) is also added.

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.47%. Comparing base (1fca5d9) to head (a9f275a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
- Coverage   74.90%   74.47%   -0.43%     
==========================================
  Files          11       11              
  Lines         761      768       +7     
==========================================
+ Hits          570      572       +2     
- Misses        191      196       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant