Closed cregouby closed 1 year ago
Yes, this is also a known limitation from utils::getSrcref()
.
As soon as something is recognized as a function it calls an @importFrom
.
I don't know how I could make a special case for R6 as this is not an inbuilt feature of R. I'm not even sure this is possible.
Of course, I'd gladly accept a PR if you manage to find a solution.
BTW, thank you for your very nice and readable issues 👍
Thanks !
Current situation
I've run
autoimport()
on the code in https://github.com/mlverse/tabnet and I get some unexpected insertion of R6 public methods as Roxygen#' @importFrom
Before
autoimport()
the following code chunk uses
view
andtranspose
as public methods of the torch R6 objectrho
https://github.com/mlverse/tabnet/blob/7186ba6048a6818283d05fb86c2af6ead862173b/R/sparsemax.R#L2-L10idem for
gather
https://github.com/mlverse/tabnet/blob/7186ba6048a6818283d05fb86c2af6ead862173b/R/sparsemax.R#L19idem for
clone
andsqueeze
https://github.com/mlverse/tabnet/blob/7186ba6048a6818283d05fb86c2af6ead862173b/R/sparsemax.R#L41-L44After
autoimport()
-
autoimport()
add erroneously import from functions from exotic libraries, messing up theNAMESPACE
file andDESCRIPTION
fileReproducible example