Skip to content

Commit 518f38e

Browse files
authored
JuliaFormatter@v2 (#135)
* JuliaFormatter@v2 * Fix format
1 parent b28143b commit 518f38e

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/format_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
shell: julia --color=yes {0}
1919
run: |
2020
using Pkg
21-
Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
21+
Pkg.add(PackageSpec(name="JuliaFormatter", version="2"))
2222
using JuliaFormatter
2323
format("src", verbose=true)
2424
format("test", verbose=true)

src/constraint.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ end
6565
Return a list of bridges that may be needed to bridge `F`-in-`S` constraints but
6666
not the bridges that may be needed by constraints added by the bridges.
6767
"""
68-
bridges(::Type{<:MOI.AbstractFunction}, ::Type{<:MOI.AbstractSet}) =
69-
Tuple{Type,Type}[]
68+
function bridges(::Type{<:MOI.AbstractFunction}, ::Type{<:MOI.AbstractSet})
69+
return Tuple{Type,Type}[]
70+
end
7071

7172
"""
7273
bridges(S::Type{<:MOI.AbstractSet})

test/testpolymodule.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function JuMP.reshape_vector(
103103
for j in 1:n
104104
for i in 1:n
105105
m = length(shape.monomials[i, j])
106-
p[i, j] = polynomial(x[k.+(1:m)], shape.monomials[i, j])
106+
p[i, j] = polynomial(x[k .+ (1:m)], shape.monomials[i, j])
107107
k += m
108108
end
109109
end

test/variable.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function test_MonomialBasis(var)
8383
@variable(m, p3[2:3], Poly(X))
8484
@test isa(p3, JuMP.Containers.DenseAxisArray{PT,1,Tuple{UnitRange{Int}}})
8585
_test_variable(m, p3[2], X)
86-
@variable(m, p4[i = 2:3, j = i:4], Poly(X), binary = true)
86+
@variable(m, p4[i=2:3, j=i:4], Poly(X), binary = true)
8787
_test_variable(m, p4[2, 3], X, true)
8888

8989
X = [x^2, y^2]

0 commit comments

Comments
 (0)