Skip to content

Commit

Permalink
🤖 Format .jl files (#472)
Browse files Browse the repository at this point in the history
Co-authored-by: tmigot <[email protected]>
  • Loading branch information
github-actions[bot] and tmigot authored Jul 25, 2024
1 parent 508033b commit 1534231
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/nlp/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ macro default_counters(Model, inner)
push!(ex.args, :(NLPModels.increment!(nlp::$(esc(Model)), s::Symbol) = increment!(nlp.$inner, s)))
push!(ex.args, :(NLPModels.decrement!(nlp::$(esc(Model)), s::Symbol) = decrement!(nlp.$inner, s)))

push!(ex.args, :(Base.getproperty(nlp::$(esc(Model)), s::Symbol) = ( s == :counters ? nlp.$inner.counters : getfield(nlp ,s))))
push!(
ex.args,
:(
Base.getproperty(nlp::$(esc(Model)), s::Symbol) =
(s == :counters ? nlp.$inner.counters : getfield(nlp, s))
),
)
ex
end

0 comments on commit 1534231

Please sign in to comment.