Skip to content

Commit 1e1b071

Browse files
committed
Fix format
1 parent 1279324 commit 1e1b071

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.JuliaFormatter.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configuration file for JuliaFormatter.jl
2+
# For more information, see: https://domluna.github.io/JuliaFormatter.jl/stable/config/
3+
4+
always_for_in = true
5+
always_use_return = true
6+
margin = 80
7+
remove_extra_newlines = true
8+
short_to_long_function_def = true

src/ArrayAD.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ function MOI.Nonlinear.Evaluator(
2323
::Mode,
2424
ordered_variables::Vector{MOI.VariableIndex},
2525
)
26-
return MOI.Nonlinear.Evaluator(model, NLPEvaluator(model, ordered_variables))
26+
return MOI.Nonlinear.Evaluator(
27+
model,
28+
NLPEvaluator(model, ordered_variables),
29+
)
2730
end
2831

29-
3032
# Override basic math functions to return NaN instead of throwing errors.
3133
# This is what NLP solvers expect, and sometimes the results aren't needed
3234
# anyway, because the code may compute derivatives wrt constants.

test/ReverseAD.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,7 @@ function test_linearity_no_hess()
648648
MOI.initialize(evaluator, [:Grad, :Jac])
649649
# We initialized without the need for the hessian so
650650
# the linearity shouldn't be computed.
651-
@test only(evaluator.backend.subexpressions).linearity ==
652-
ArrayAD.NONLINEAR
651+
@test only(evaluator.backend.subexpressions).linearity == ArrayAD.NONLINEAR
653652
return
654653
end
655654

0 commit comments

Comments
 (0)