Skip to content

Commit 463f473

Browse files
committed
Fix format
1 parent a8aa282 commit 463f473

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/Utilities/sparse_matrix.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,7 @@ function _extract_column_as_function(
270270
val = value_map(A.nzval[i])
271271
# `modify_coefficients` can create zeros
272272
if !iszero(val)
273-
push!(
274-
func.terms,
275-
MOI.ScalarAffineTerm(val, MOI.VariableIndex(row)),
276-
)
273+
push!(func.terms, MOI.ScalarAffineTerm(val, MOI.VariableIndex(row)))
277274
end
278275
end
279276
return func

test/Utilities/test_matrix_of_constraints.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -848,8 +848,8 @@ function test_modify_multirow_change()
848848
MOI.modify(model, ci, MOI.MultirowChange(x1, [(1, 7), (2, 8)]))
849849
f = MOI.get(model, MOI.ConstraintFunction(), ci)
850850
coefs = Dict(
851-
(t.output_index, t.scalar_term.variable) => t.scalar_term.coefficient
852-
for t in f.terms
851+
(t.output_index, t.scalar_term.variable) =>
852+
t.scalar_term.coefficient for t in f.terms
853853
)
854854
@test coefs[(1, x1)] == 7
855855
@test coefs[(2, x1)] == 8
@@ -876,8 +876,8 @@ function test_modify_multirow_change_single_row()
876876
MOI.modify(model, ci, MOI.MultirowChange(x2, [(2, 9)]))
877877
f = MOI.get(model, MOI.ConstraintFunction(), ci)
878878
coefs = Dict(
879-
(t.output_index, t.scalar_term.variable) => t.scalar_term.coefficient
880-
for t in f.terms
879+
(t.output_index, t.scalar_term.variable) =>
880+
t.scalar_term.coefficient for t in f.terms
881881
)
882882
x1 = index_map[x[1]]
883883
@test coefs[(1, x1)] == 2
@@ -908,8 +908,8 @@ function test_modify_multirow_change_to_zero()
908908
@test MOI.Utilities.is_canonical(f)
909909
@test length(f.terms) == 3
910910
coefs = Dict(
911-
(t.output_index, t.scalar_term.variable) => t.scalar_term.coefficient
912-
for t in f.terms
911+
(t.output_index, t.scalar_term.variable) =>
912+
t.scalar_term.coefficient for t in f.terms
913913
)
914914
@test !haskey(coefs, (1, x1))
915915
@test coefs[(2, x1)] == 4

0 commit comments

Comments
 (0)