Skip to content

Commit 4b4a193

Browse files
mtfishmangithub-actions[bot]
authored andcommitted
Format .jl files (ITensorFormatter)
1 parent 4c591d1 commit 4b4a193

File tree

7 files changed

+20
-32
lines changed

7 files changed

+20
-32
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "QuantumOperatorAlgebra"
22
uuid = "c7a6d0f7-daa6-4368-ba67-89ed64127c3b"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[compat]

benchmark/benchmarks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using QuantumOperatorAlgebra
21
using BenchmarkTools
2+
using QuantumOperatorAlgebra
33

44
SUITE = BenchmarkGroup()
55
SUITE["rand"] = @benchmarkable rand(10)

docs/make.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using QuantumOperatorAlgebra: QuantumOperatorAlgebra
21
using Documenter: Documenter, DocMeta, deploydocs, makedocs
2+
using QuantumOperatorAlgebra: QuantumOperatorAlgebra
33

44
DocMeta.setdocmeta!(
5-
QuantumOperatorAlgebra, :DocTestSetup, :(using QuantumOperatorAlgebra); recursive = true
5+
QuantumOperatorAlgebra, :DocTestSetup, :(using QuantumOperatorAlgebra); recursive = true,
66
)
77

88
include("make_index.jl")
@@ -20,5 +20,6 @@ makedocs(;
2020
)
2121

2222
deploydocs(;
23-
repo = "github.com/ITensor/QuantumOperatorAlgebra.jl", devbranch = "main", push_preview = true
23+
repo = "github.com/ITensor/QuantumOperatorAlgebra.jl", devbranch = "main",
24+
push_preview = true,
2425
)

src/LazyApply/LazyApply.jl

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
module LazyApply
22

3-
import Base:
4-
==,
5-
+,
6-
-,
7-
*,
8-
/,
9-
^,
10-
exp,
11-
adjoint,
12-
copy,
13-
show,
14-
getindex,
15-
length,
16-
isless,
17-
iterate,
18-
firstindex,
19-
lastindex,
20-
keys,
21-
reverse,
22-
size
3+
import Base: *, +, -, /, ==, ^, adjoint, copy, exp, firstindex, getindex, isless, iterate,
4+
keys, lastindex, length, reverse, show, size
235

246
export Applied, Scaled, Sum, Prod, Exp, coefficient, argument, expand, materialize, terms
257

src/op.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using .LazyApply: LazyApply, Exp, Prod, Scaled, Sum, argument, coefficient
1+
using .LazyApply: Exp, LazyApply, Prod, Scaled, Sum, argument, coefficient
22

33
#####################################################################################
44
# General functionality
@@ -47,7 +47,7 @@ end
4747
## end
4848

4949
struct Op
50-
which_op
50+
which_op::Any
5151
sites::Tuple
5252
params::NamedTuple
5353
function Op(which_op, site...; kwargs...)
@@ -312,7 +312,7 @@ end
312312
Base.show(io::IO, o::Prod{Op}) = show(io, MIME("text/plain"), o)
313313

314314
function Base.show(
315-
io::IO, m::MIME"text/plain", o::Scaled{C, O}
315+
io::IO, m::MIME"text/plain", o::Scaled{C, O},
316316
) where {C, O <: Union{Op, Prod{Op}}}
317317
c = coefficient(o)
318318
if isreal(c)

test/runtests.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ const GROUP = uppercase(
1313
end,
1414
)
1515

16-
"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
16+
"""
17+
match files of the form `test_*.jl`, but exclude `*setup*.jl`
18+
"""
1719
function istestfile(fn)
18-
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
20+
return endswith(fn, ".jl") && startswith(basename(fn), "test_") &&
21+
!contains(fn, "setup")
1922
end
20-
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`"
23+
"""
24+
match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`
25+
"""
2126
function isexamplefile(fn)
2227
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
2328
end

test/test_aqua.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using QuantumOperatorAlgebra: QuantumOperatorAlgebra
21
using Aqua: Aqua
2+
using QuantumOperatorAlgebra: QuantumOperatorAlgebra
33
using Test: @testset
44

55
@testset "Code quality (Aqua.jl)" begin

0 commit comments

Comments
 (0)