Skip to content

Commit ebd43b4

Browse files
mtfishmangithub-actions[bot]
authored andcommitted
Format .jl files (Runic)
1 parent 782c36c commit ebd43b4

File tree

10 files changed

+322
-320
lines changed

10 files changed

+322
-320
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MapBroadcast"
22
uuid = "ebd9b9da-f48d-417c-9660-449667d60261"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.1.11"
4+
version = "0.1.12"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"

docs/make.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
using MapBroadcast: MapBroadcast
22
using Documenter: Documenter, DocMeta, deploydocs, makedocs
33

4-
DocMeta.setdocmeta!(MapBroadcast, :DocTestSetup, :(using MapBroadcast); recursive=true)
4+
DocMeta.setdocmeta!(MapBroadcast, :DocTestSetup, :(using MapBroadcast); recursive = true)
55

66
include("make_index.jl")
77

88
makedocs(;
9-
modules=[MapBroadcast],
10-
authors="ITensor developers <[email protected]> and contributors",
11-
sitename="MapBroadcast.jl",
12-
format=Documenter.HTML(;
13-
canonical="https://itensor.github.io/MapBroadcast.jl",
14-
edit_link="main",
15-
assets=["assets/favicon.ico", "assets/extras.css"],
16-
),
17-
pages=["Home" => "index.md", "Reference" => "reference.md"],
9+
modules = [MapBroadcast],
10+
authors = "ITensor developers <[email protected]> and contributors",
11+
sitename = "MapBroadcast.jl",
12+
format = Documenter.HTML(;
13+
canonical = "https://itensor.github.io/MapBroadcast.jl",
14+
edit_link = "main",
15+
assets = ["assets/favicon.ico", "assets/extras.css"],
16+
),
17+
pages = ["Home" => "index.md", "Reference" => "reference.md"],
1818
)
1919

20-
deploydocs(; repo="github.com/ITensor/MapBroadcast.jl", devbranch="main", push_preview=true)
20+
deploydocs(; repo = "github.com/ITensor/MapBroadcast.jl", devbranch = "main", push_preview = true)

docs/make_index.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using MapBroadcast: MapBroadcast
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
```@raw html
77
<img class="display-light-only" src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
88
<img class="display-dark-only" src="assets/CCQ-dark.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
99
```
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(MapBroadcast), "examples", "README.jl"),
17-
joinpath(pkgdir(MapBroadcast), "docs", "src");
18-
flavor=Literate.DocumenterFlavor(),
19-
name="index",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(MapBroadcast), "examples", "README.jl"),
17+
joinpath(pkgdir(MapBroadcast), "docs", "src");
18+
flavor = Literate.DocumenterFlavor(),
19+
name = "index",
20+
postprocess = ccq_logo,
2121
)

docs/make_readme.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using MapBroadcast: MapBroadcast
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
<picture>
77
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
88
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
99
</picture>
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(MapBroadcast), "examples", "README.jl"),
17-
joinpath(pkgdir(MapBroadcast));
18-
flavor=Literate.CommonMarkFlavor(),
19-
name="README",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(MapBroadcast), "examples", "README.jl"),
17+
joinpath(pkgdir(MapBroadcast));
18+
flavor = Literate.CommonMarkFlavor(),
19+
name = "README",
20+
postprocess = ccq_logo,
2121
)

examples/README.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# # MapBroadcast.jl
2-
#
2+
#
33
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/MapBroadcast.jl/stable/)
44
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/MapBroadcast.jl/dev/)
55
# [![Build Status](https://github.com/ITensor/MapBroadcast.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/MapBroadcast.jl/actions/workflows/Tests.yml?query=branch%3Amain)

src/linearcombination.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
using Base.Broadcast: Broadcasted
22
struct LinearCombination{C} <: Function
3-
coefficients::C
3+
coefficients::C
44
end
55
coefficients(a::LinearCombination) = a.coefficients
66
function (f::LinearCombination)(args...)
7-
return mapreduce(*,+,coefficients(f),args)
7+
return mapreduce(*, +, coefficients(f), args)
88
end
99

10-
struct Summed{Style,N,C<:NTuple{N,Any},A<:NTuple{N,Any}}
11-
style::Style
12-
coefficients::C
13-
arguments::A
10+
struct Summed{Style, N, C <: NTuple{N, Any}, A <: NTuple{N, Any}}
11+
style::Style
12+
coefficients::C
13+
arguments::A
1414
end
1515
Summed(a::Summed) = a
1616
coefficients(a::Summed) = a.coefficients
@@ -20,25 +20,25 @@ LinearCombination(a::Summed) = LinearCombination(coefficients(a))
2020
using Base.Broadcast: combine_axes
2121
Base.axes(a::Summed) = combine_axes(a.arguments...)
2222
function Base.eltype(a::Summed)
23-
cts = typeof.(coefficients(a))
24-
elts = eltype.(arguments(a))
25-
ts = map((ct, elt) -> Base.promote_op(*, ct, elt), cts, elts)
26-
return Base.promote_op(+, ts...)
23+
cts = typeof.(coefficients(a))
24+
elts = eltype.(arguments(a))
25+
ts = map((ct, elt) -> Base.promote_op(*, ct, elt), cts, elts)
26+
return Base.promote_op(+, ts...)
2727
end
2828
function Base.getindex(a::Summed, I...)
29-
return mapreduce(+, coefficients(a), arguments(a)) do c, a
30-
return c * a[I...]
31-
end
29+
return mapreduce(+, coefficients(a), arguments(a)) do c, a
30+
return c * a[I...]
31+
end
3232
end
3333
using Base.Broadcast: combine_styles
3434
function Summed(coefficients::Tuple, arguments::Tuple)
35-
return Summed(combine_styles(arguments...), coefficients, arguments)
35+
return Summed(combine_styles(arguments...), coefficients, arguments)
3636
end
3737
Summed(a) = Summed((one(eltype(a)),), (a,))
3838
function Base.:+(a::Summed, b::Summed)
39-
return Summed(
40-
(coefficients(a)..., coefficients(b)...), (arguments(a)..., arguments(b)...)
41-
)
39+
return Summed(
40+
(coefficients(a)..., coefficients(b)...), (arguments(a)..., arguments(b)...)
41+
)
4242
end
4343
Base.:-(a::Summed, b::Summed) = a + (-b)
4444
Base.:+(a::Summed, b::AbstractArray) = a + Summed(b)
@@ -54,15 +54,15 @@ Base.similar(a::Summed) = similar(a, eltype(a))
5454
Base.similar(a::Summed, elt::Type) = similar(a, elt, axes(a))
5555
Base.similar(a::Summed, ax::Tuple) = similar(a, eltype(a), ax)
5656
function Base.similar(a::Summed, elt::Type, ax::Tuple)
57-
return similar(Broadcasted(a), elt, ax)
57+
return similar(Broadcasted(a), elt, ax)
5858
end
5959
Base.copy(a::Summed) = copyto!(similar(a), a)
6060
function Base.copyto!(dest::AbstractArray, a::Summed)
61-
return copyto!(dest, Broadcasted(a))
61+
return copyto!(dest, Broadcasted(a))
6262
end
6363
function Broadcast.Broadcasted(a::Summed)
64-
f = LinearCombination(a)
65-
return Broadcasted(style(a), f, arguments(a), axes(a))
64+
f = LinearCombination(a)
65+
return Broadcasted(style(a), f, arguments(a), axes(a))
6666
end
6767

6868
using Base.Broadcast: Broadcast

0 commit comments

Comments
 (0)