Skip to content

docs: fix dots docs thanks to roxygen2's warning about useless inheritParams - #2868

Draft
maelle wants to merge 2 commits into
mainfrom
roxy2
Draft

docs: fix dots docs thanks to roxygen2's warning about useless inheritParams#2868
maelle wants to merge 2 commits into
mainfrom
roxy2

Conversation

@maelle

@maelle maelle commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Co-Authored-By: Claude Sonnet 5

Running document() generated warnings about useless inheritParams (and a missing namespace in a link).

I think that when we added dots to force users to name optional parameters, we might have not paid enough attention to the resulting manual pages. When a function with the "rlang dots" was documented on the same page as a function with other dots (dots actually forwarded to another function), the documentation used the docs of that other dots params, which is incorrect.

@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 81e2dd3 is merged into main:

  • ✔️as_adjacency_matrix: 812ms -> 804ms [-2.27%, +0.5%]
  • ✔️as_biadjacency_matrix: 795ms -> 787ms [-2.23%, +0.39%]
  • ✔️as_data_frame_both: 1.83ms -> 1.8ms [-3.52%, +0.98%]
  • ✔️as_long_data_frame: 4.58ms -> 4.44ms [-6.09%, +0.02%]
  • ✔️es_attr_filter: 2.81ms -> 2.81ms [-2.73%, +2.56%]
  • ✔️graph_from_adjacency_matrix: 124ms -> 125ms [-0.4%, +2.84%]
  • ✔️graph_from_data_frame: 3.98ms -> 3.95ms [-2.37%, +0.69%]
  • ✔️vs_attr_filter: 1.61ms -> 1.61ms [-2.13%, +2.98%]
  • ✔️vs_by_name: 1.05ms -> 1.02ms [-6.16%, +1.04%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

Comment thread man/sir.Rd
\item{x}{A \code{sir} object, returned by the \code{sir()} function.}

\item{\dots}{Additional arguments, ignored currently.}
\item{\dots}{For \code{sir()} and \code{time_bins()}, these dots must be empty. For

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wonder whether in the cases of having the dots for S3 method consistency, the code should error and then we could stop documenting the dots differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant