Skip to content

Commit 4a19b89

Browse files
committed
format
1 parent 11bd52f commit 4a19b89

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/reactionsystem.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ function Base.propertynames(sys::ReactionSystem; private = false)
707707
MT.has_observed(sys) && for s in get_observed(sys)
708708
push!(names, getname(s.lhs))
709709
end
710-
(get_constraints(sys) !== nothing) && append!(names, propertynames(get_constraints(sys)))
710+
(get_constraints(sys) !== nothing) &&
711+
append!(names, propertynames(get_constraints(sys)))
711712
return unique!(names)
712713
end
713714
end

test/reactionsystem_components.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#! format: off
12
using ModelingToolkit, Catalyst, LinearAlgebra, OrdinaryDiffEq, Test
23
using SciMLNLSolve
34

@@ -270,7 +271,6 @@ oprob = ODEProblem(structural_simplify(osys), u₀, (0.0, 10.0), p)
270271
sol = solve(oprob, Tsit5())
271272
@test isapprox(0, norm(sol[ns.D] .- 2 * sol[A] - 3 * sol[B]), atol = (100 * eps()))
272273

273-
274274
# test API functions for composed model
275275
@test issetequal(species(rs), [A, B, C])
276276
@test issetequal(states(rs), [A, B, C, ns.D])
@@ -366,15 +366,15 @@ orsc = convert(ODESystem, rsc)
366366
# test constraint system symbols can be set via setdefaults!
367367
let
368368
@parameters b
369-
@variables t V(t) [isbcspecies=true]
369+
@variables t V(t) [isbcspecies = true]
370370
rn = @reaction_network begin
371371
k/$V, A + B --> C
372372
end k
373373
Dt = Differential(t)
374-
@named csys = ODESystem([Dt(V) ~ -b*V], t)
374+
@named csys = ODESystem([Dt(V) ~ -b * V], t)
375375
@named fullrn = extend(csys, rn)
376376
setdefaults!(fullrn, [:b => 2.0])
377377
@unpack b = fullrn
378378
@test haskey(ModelingToolkit.defaults(fullrn), b)
379379
@test ModelingToolkit.defaults(fullrn)[b] == 2.0
380-
end
380+
end

0 commit comments

Comments
 (0)