Skip to content

Commit 38b70e4

Browse files
format and don't define init unless required (get it?)
1 parent fd3df79 commit 38b70e4

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

ext/DiffEqBaseReverseDiffExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ ReverseDiff.@grad function solve_up(prob, sensealg, u0, p, args...; kwargs...)
143143
Array(out[1]), actual_adjoint
144144
end
145145

146-
end
146+
end

ext/DiffEqBaseTrackerExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ Tracker.@grad function DiffEqBase.solve_up(prob,
9292
SciMLBase.TrackerOriginator(), args...; kwargs...)
9393
end
9494

95-
end
95+
end

ext/DiffEqBaseZygoteExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ ZygoteRules.@adjoint function SciMLBase.responsible_map(f,
5151
∇responsible_map(__context__, f, args...)
5252
end
5353

54-
end
54+
end

src/init.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function SciMLBase.tmap(args...)
1414
error("Zygote must be added to differentiate Zygote? If you see this error, report it.")
1515
end
1616

17-
function __init__()
18-
@static if !isdefined(Base, :get_extension)
17+
@static if !isdefined(Base, :get_extension)
18+
function __init__()
1919
@require Measurements="eff96d63-e80a-5855-80a2-b1b0885c5ab7" begin include("../ext/DiffEqBaseMeasurementsExt.jl") end
2020

2121
@require MonteCarloMeasurements="0987c9cc-fe09-11e8-30f0-b96dd679fdca" begin include("../ext/DiffEqBaseMonteCarloMeasurementsExt.jl") end
@@ -29,7 +29,7 @@ function __init__()
2929
@require ReverseDiff="37e2e3b7-166d-5795-8a7a-e32c996b4267" begin include("../ext/DiffEqBaseReverseDiffExt.jl") end
3030

3131
@require Zygote="e88e6eb3-aa80-5325-afca-941959d7151f" begin include("../ext/DiffEqBaseZygoteExt.jl") end
32-
32+
3333
@require MPI="da04e1cc-30fd-572f-bb4f-1f8673147195" begin include("../ext/DiffEqBaseMPIExt.jl") end
3434
end
3535
end

test/downstream/solve_error_handling.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ for u0 in ([0.0, 0.0], nothing)
4444
end
4545

4646
# Allow empty mass matrix for empty u0
47-
fmm = ODEFunction((du, u, t)->nothing, mass_matrix = zeros(0, 0))
48-
prob = ODEProblem(fmm, nothing, (0., 1.))
47+
fmm = ODEFunction((du, u, t) -> nothing, mass_matrix = zeros(0, 0))
48+
prob = ODEProblem(fmm, nothing, (0.0, 1.0))
4949
sol = solve(prob, Tsit5())
5050
@test isa(sol, DiffEqBase.ODESolution)

0 commit comments

Comments
 (0)