Skip to content

Commit a8a595f

Browse files
Nj221102nitish jhaMichaelChirico
authored
Update Imports from Blanket to Selective Import for Improved Code Maintainability (#5988)
* Changed blanket imports to selective imports * removed quotes * alphabetize * removed time from imports * Update test.data.table.R * added name to Authors@R --------- Co-authored-by: nitish jha <[email protected]> Co-authored-by: Michael Chirico <[email protected]>
1 parent e2ce90a commit a8a595f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@ Authors@R: c(
8282
person("Josh","O'Brien", role="ctb"),
8383
person("Dereck","de Mezquita", role="ctb"),
8484
person("Michael","Czekanski", role="ctb"),
85-
person("Dmitry", "Shemetov", role="ctb")
85+
person("Dmitry", "Shemetov", role="ctb"),
86+
person("Nitish", "Jha", role="ctb")
8687
)

NAMESPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
useDynLib("data_table", .registration=TRUE)
22

33
## For S4-ization
4-
import(methods)
4+
importFrom(methods, "S3Part<-", slotNames)
55
exportClasses(data.table, IDate, ITime)
66
##
77

@@ -130,11 +130,11 @@ S3method(melt, default)
130130
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
131131
export(melt.data.table, dcast.data.table)
132132

133-
import(utils)
133+
importFrom(utils, capture.output, contrib.url, download.file, flush.console, getS3method, head, packageVersion, tail, untar, unzip)
134134
export(update_dev_pkg)
135135
S3method(tail, data.table)
136136
S3method(head, data.table)
137-
import(stats)
137+
importFrom(stats, as.formula, na.omit, setNames, terms)
138138
S3method(na.omit, data.table)
139139

140140
S3method(as.data.table, xts)

R/test.data.table.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ test.data.table = function(script="tests.Rraw", verbose=FALSE, pkg=".", silent=F
191191
}
192192

193193
# There aren't any errors, so we can use up 11 lines for the timings table
194-
nTest = RSS = NULL # to avoid 'no visible binding' note
194+
time = nTest = RSS = NULL # to avoid 'no visible binding' note
195195
timings = env$timings[nTest>0]
196196
if (!memtest) {
197197
ans = head(timings[if (dev) -1L else TRUE][order(-time)], 10L)[,RSS:=NULL] # exclude id 1 in dev as that includes JIT

0 commit comments

Comments
 (0)