Skip to content

Commit 792d28f

Browse files
committed
formatter
1 parent 454779a commit 792d28f

5 files changed

Lines changed: 16 additions & 14 deletions

File tree

src/TensorKit.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ module TensorKit
99
#---------
1010
# Types:
1111
export Sector, AbstractIrrep, Irrep
12-
export FusionStyle, UniqueFusion, MultipleFusion, MultiplicityFreeFusion,
13-
SimpleFusion, GenericFusion
12+
export FusionStyle, UniqueFusion, MultipleFusion, MultiplicityFreeFusion, SimpleFusion, GenericFusion
1413
export UnitStyle, SimpleUnit, GenericUnit
1514
export BraidingStyle, SymmetricBraiding, Bosonic, Fermionic, Anyonic, NoBraiding
1615
export Trivial, Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep, SU2Irrep, CU1Irrep

src/spaces/gradedspace.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ function Base.axes(V::GradedSpace{I}, c::I) where {I <: Sector}
134134
return (offset + 1):(offset + dim(c) * dim(V, c))
135135
end
136136

137-
unitspace(S::Type{<:GradedSpace{I}}) where {I<:Sector} = S(unit(I) => 1)
138-
zerospace(S::Type{<:GradedSpace{I}}) where {I<:Sector} = S(unit(I) => 0)
137+
unitspace(S::Type{<:GradedSpace{I}}) where {I <: Sector} = S(unit(I) => 1)
138+
zerospace(S::Type{<:GradedSpace{I}}) where {I <: Sector} = S(unit(I) => 0)
139139

140140
# TODO: the following methods can probably be implemented more efficiently for
141141
# `FiniteGradedSpace`, but we don't expect them to be used often in hot loops, so

src/spaces/vectorspaces.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ that this is different from `one(V::S)`, which returns the empty product space
129129
"""
130130
unitspace(V::ElementarySpace) = unitspace(typeof(V))
131131
Base.oneunit(V::ElementarySpace) = unitspace(V)
132-
Base.oneunit(::Type{V}) where {V<:ElementarySpace} = unitspace(V)
132+
Base.oneunit(::Type{V}) where {V <: ElementarySpace} = unitspace(V)
133133

134134
"""
135135
zerospace(V::S) where {S<:ElementarySpace} -> S
@@ -140,7 +140,7 @@ This is, with a slight abuse of notation, the zero element of the direct sum of
140140
"""
141141
zerospace(V::ElementarySpace) = zerospace(typeof(V))
142142
Base.zero(V::ElementarySpace) = zerospace(V)
143-
Base.zero(::Type{V}) where {V<:ElementarySpace} = zerospace(V)
143+
Base.zero(::Type{V}) where {V <: ElementarySpace} = zerospace(V)
144144

145145
"""
146146
⊕(V₁::S, V₂::S, V₃::S...) where {S<:ElementarySpace} -> S

src/tensors/linalg.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,15 +569,19 @@ function ⊗(t1::AbstractTensorMap, t2::AbstractTensorMap)
569569
throw(SpaceMismatch("spacetype(t1) ≠ spacetype(t2)"))
570570
cod1, cod2 = codomain(t1), codomain(t2)
571571
dom1, dom2 = domain(t1), domain(t2)
572-
p12 = ((codomainind(t1)..., (codomainind(t2) .+ numind(t1))...),
573-
(domainind(t1)..., (domainind(t2) .+ numind(t1))...))
572+
p12 = (
573+
(codomainind(t1)..., (codomainind(t2) .+ numind(t1))...),
574+
(domainind(t1)..., (domainind(t2) .+ numind(t1))...),
575+
)
574576

575577
T = promote_type(scalartype(t1), scalartype(t2))
576578
TC = promote_type(sectorscalartype(sectortype(t1)), T)
577-
t = TO.tensoralloc_contract(TC,
578-
t1, ((codomainind(t1)..., domainind(t1)...), ()), false,
579-
t2, ((), (codomainind(t2)..., domainind(t2)...)), false,
580-
p12, Val(false))
579+
t = TO.tensoralloc_contract(
580+
TC,
581+
t1, ((codomainind(t1)..., domainind(t1)...), ()), false,
582+
t2, ((), (codomainind(t2)..., domainind(t2)...)), false,
583+
p12, Val(false)
584+
)
581585

582586
zerovector!(t)
583587
for (f1l, f1r) in fusiontrees(t1)

test/spaces.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ println("------------------------------------")
209209
@test @constinferred(unitspace(V)) == W == unitspace(typeof(V))
210210
@test @constinferred(zerospace(V)) == GradedSpace(unit(I) => 0)
211211
# randsector never returns trivial sector, so this cannot error
212-
@test_throws ArgumentError GradedSpace(unit(I) => 1, randsector(I) => 0,
213-
unit(I) => 3)
212+
@test_throws ArgumentError GradedSpace(unit(I) => 1, randsector(I) => 0, unit(I) => 3)
214213
@test eval(Meta.parse(sprint(show, W))) == W
215214
@test isa(V, VectorSpace)
216215
@test isa(V, ElementarySpace)

0 commit comments

Comments
 (0)