Skip to content

Commit 4cae113

Browse files
authored
Merge pull request #504 from JuliaParallel/includes
Cleanup imports with ExplicitImports.jl
2 parents 070b608 + 72e13e7 commit 4cae113

File tree

12 files changed

+28
-37
lines changed

12 files changed

+28
-37
lines changed

ext/GraphVizExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99
import Dagger
1010
import Dagger: EagerThunk, Chunk, Processor
1111
import Dagger.TimespanLogging: Timespan
12-
using Dagger.Graphs
12+
import Graphs: SimpleDiGraph, add_edge!, add_vertex!, inneighbors, outneighbors, vertices, is_directed, edges, nv
1313

1414
function pretty_time(t; digits=3)
1515
r(t) = round(t; digits)

src/Dagger.jl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
module Dagger
22

3-
using Distributed, SharedArrays, Serialization
3+
import Serialization
4+
import Serialization: AbstractSerializer, serialize, deserialize
5+
import SparseArrays: sprand, SparseMatrixCSC
46

5-
using MemPool
7+
import MemPool
8+
import MemPool: DRef, FileRef, poolget, poolset
69

7-
import Base: collect, adjoint, reduce
8-
import Distributed: procs
10+
import Base: collect, reduce
11+
import Distributed
12+
import Distributed: Future, RemoteChannel, myid, workers, nworkers, procs, remotecall, remotecall_wait, remotecall_fetch
913

10-
using LinearAlgebra
11-
import LinearAlgebra: transpose
14+
import LinearAlgebra
15+
import LinearAlgebra: Adjoint, BLAS, Diagonal, LAPACK, LowerTriangular, PosDefException, Transpose, UpperTriangular, diagind, ishermitian, issymmetric
1216

13-
using UUIDs
17+
import UUIDs: UUID, uuid4
1418

1519
if !isdefined(Base, :ScopedValues)
1620
import ScopedValues: ScopedValue, with
@@ -22,15 +26,17 @@ if !isdefined(Base, :get_extension)
2226
using Requires
2327
end
2428

25-
using MacroTools
26-
using TimespanLogging
29+
import TimespanLogging
30+
import TimespanLogging: timespan_start, timespan_finish
2731

2832
include("lib/util.jl")
2933
include("utils/dagdebug.jl")
3034

3135
# Distributed data
3236
include("utils/locked-object.jl")
3337
include("utils/tasks.jl")
38+
39+
import MacroTools: @capture
3440
include("options.jl")
3541
include("processor.jl")
3642
include("threadproc.jl")
@@ -85,7 +91,7 @@ include("utils/logging-events.jl")
8591
include("utils/logging.jl")
8692

8793
# Precompilation
88-
using PrecompileTools
94+
import PrecompileTools: @compile_workload
8995
include("precompile.jl")
9096

9197
function __init__()

src/array/alloc.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Base: cat
2-
using SparseArrays, Random
3-
import SparseArrays: sprand
2+
import Random: MersenneTwister
43
export partition
54

65
mutable struct AllocateArray{T,N} <: ArrayOp{T,N}

src/array/darray.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import Base: ==, fetch
2-
using Serialization
3-
import Serialization: serialize, deserialize
42

53
###### Array Domains ######
64

src/array/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TaskLocalValues
1+
import TaskLocalValues: TaskLocalValue
22

33
### getindex
44

src/array/operators.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import Base: exp, expm1, log, log10, log1p, sqrt, cbrt, exponent,
2-
significand, sin, sinpi, cos, cospi, tan, sec, cot, csc,
3-
sinh, cosh, tanh, coth, sech, csch,
4-
asin, acos, atan, acot, asec, acsc,
5-
asinh, acosh, atanh, acoth, asech, acsch, sinc, cosc,
6-
+, -, %, &, *
7-
81
import Base: broadcast
92
import Base: Broadcast
103
import Base.Broadcast: Broadcasted, BroadcastStyle, combine_eltypes

src/array/sort.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Base.Sort: Forward, Ordering, Algorithm, lt
2-
using Distributed
1+
import Base.Sort: Forward, Ordering, lt
2+
import SharedArrays: SharedArray
33

4-
using StatsBase
4+
import StatsBase: fit!, sample
55

66

77
function getmedians(x, n)

src/array/sparse_partition.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export partition_sparse
2-
using SparseArrays
32

43
function partition_sparse(colptr, nnz, sz, nparts)
54
nnz_per_chunk = nnz/nparts

src/chunks.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Serialization
2-
31
export domain, UnitDomain, project, alignfirst, ArrayDomain
42

53
import Base: isempty, getindex, intersect, ==, size, length, ndims

src/datadeps.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Graphs
1+
import Graphs: SimpleDiGraph, add_edge!, add_vertex!, inneighbors, outneighbors, nv
22

33
export In, Out, InOut, spawn_datadeps
44

0 commit comments

Comments
 (0)