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

Minimal argument checking review #561

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented Sep 10, 2023

Description

Standardize argument checking with rlang::arg_match0() + use inherits instead of class(x) %in%

Related Issue

Addresses #549

Example

See updates in tests, but this just uses https://rlang.r-lib.org/reference/arg_match.html + inherits in some places.

@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Merging #561 (3a4bf66) into main (bb23615) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #561   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         1184      1180    -4     
=========================================
- Hits          1184      1180    -4     
Files Changed Coverage Δ
R/adorn_ns.R 100.00% <100.00%> (ø)
R/adorn_pct_formatting.R 100.00% <100.00%> (ø)
R/adorn_percentages.R 100.00% <100.00%> (ø)
R/adorn_title.R 100.00% <100.00%> (ø)
R/adorn_totals.R 100.00% <100.00%> (ø)
R/as_and_untabyl.R 100.00% <100.00%> (ø)
R/tabyl.R 100.00% <100.00%> (ø)

R/tabyl.R Show resolved Hide resolved
@olivroy
Copy link
Contributor Author

olivroy commented Dec 7, 2023

@billdenney in case you have time to look at this PR! it is fairly minimal and straightforward!

@billdenney
Copy link
Collaborator

This looks good to me.

@billdenney billdenney merged commit 2583cf0 into sfirke:main Dec 7, 2023
@olivroy olivroy deleted the code-quality branch December 7, 2023 13:59
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