Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Nov 2, 2023
1 parent 9f688b0 commit 1b03e2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/canonical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ A.metabolite_notes(m::Model, id::String) = m.metabolites[id].notes
A.gene_notes(m::Model, id::String) = m.genes[id].notes

function A.stoichiometry(m::Model)
midxs = Dict(mid => idx for (idx,(mid,_)) = enumerate(m.metabolites))
midxs = Dict(mid => idx for (idx, (mid, _)) in enumerate(m.metabolites))
I = Int[]
J = Int[]
V = Float64[]
for (ridx, (_, r)) = enumerate(m.reactions)
for (smid, v) = r.stoichiometry
for (ridx, (_, r)) in enumerate(m.reactions)
for (smid, v) in r.stoichiometry
push!(I, midxs[smid])
push!(J, ridx)
push!(V, v)
Expand Down
2 changes: 1 addition & 1 deletion src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $(TYPEDSIGNATURES)
Helper for nicely showing the contents of possibly complicated model
structures.
"""
function pretty_print_kwdef(io::Base.IO, x::T) where T
function pretty_print_kwdef(io::Base.IO, x::T) where {T}
println(io, "$T(")
(_, cols) = displaysize(io)
for fn in fieldnames(T)
Expand Down

0 comments on commit 1b03e2b

Please sign in to comment.