Skip to content

Commit 9659a5c

Browse files
committed
Fix format
1 parent ba9246f commit 9659a5c

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

src/comparison.jl

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,18 @@ struct ExponentsIterator{M,D<:Union{Nothing,Int},O}
416416
inline::Bool = false,
417417
) where {M}
418418
if mindegree < 0
419-
throw(ArgumentError("The `mindegree` of `ExponentsIterator` cannot be negative."))
419+
throw(
420+
ArgumentError(
421+
"The `mindegree` of `ExponentsIterator` cannot be negative.",
422+
),
423+
)
420424
end
421425
if M <: Reverse
422-
throw(ArgumentError("Ordering `$M` is not a valid ordering, use `Graded{$M}` instead."))
426+
throw(
427+
ArgumentError(
428+
"Ordering `$M` is not a valid ordering, use `Graded{$M}` instead.",
429+
),
430+
)
423431
end
424432
if length(object) == 0 && isnothing(maxdegree)
425433
# Otherwise, it will incorrectly think that the iterator is infinite
@@ -500,7 +508,12 @@ _zero!(x::Tuple) = _zero(x)
500508
_copy(x) = copy(x)
501509
_copy(x::Tuple) = x
502510

503-
function __iterate!(it::ExponentsIterator{Graded{Reverse{M}}}, z, i, deg) where {M}
511+
function __iterate!(
512+
it::ExponentsIterator{Graded{Reverse{M}}},
513+
z,
514+
i,
515+
deg,
516+
) where {M}
504517
z = _increment!(z, -1, i)
505518
k = _last_lex_index(nvariables(it), M)
506519
Δ = z[k] + 1

test/comparison.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ function _test(nvars::Int, M; kws...)
1717
end
1818

1919
function test_errors()
20-
err = ArgumentError("The `mindegree` of `ExponentsIterator` cannot be negative.")
20+
err = ArgumentError(
21+
"The `mindegree` of `ExponentsIterator` cannot be negative.",
22+
)
2123
@test_throws err ExponentsIterator{LexOrder}([0], mindegree = -1)
2224
M = Reverse{LexOrder}
23-
err = ArgumentError("Ordering `$M` is not a valid ordering, use `Graded{$M}` instead.")
25+
err = ArgumentError(
26+
"Ordering `$M` is not a valid ordering, use `Graded{$M}` instead.",
27+
)
2428
@test_throws err ExponentsIterator{M}([0], maxdegree = 2)
2529
end
2630

@@ -30,7 +34,8 @@ function test_exponents_iterator()
3034
@testset "maxdegree = $maxdegree" for maxdegree in
3135
vcat(nothing, 0:3)
3236
for L in [LexOrder, InverseLexOrder]
33-
@testset "M = $M" for M in [L, Graded{L}, Graded{Reverse{L}}]
37+
@testset "M = $M" for M in
38+
[L, Graded{L}, Graded{Reverse{L}}]
3439
_test(nvars, M; mindegree, maxdegree)
3540
end
3641
end

0 commit comments

Comments
 (0)