Skip to content

Commit 24375d1

Browse files
committed
Apply Runic formatter
1 parent 7dbd3ca commit 24375d1

133 files changed

Lines changed: 6493 additions & 6486 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DifferentiationInterface/docs/make.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ readme_str = replace(readme_str, "> [!CAUTION]\n> " => "!!! warning\n ")
2121
write(joinpath(@__DIR__, "src", "index.md"), readme_str)
2222

2323
makedocs(;
24-
modules=[DifferentiationInterface],
25-
authors="Guillaume Dalle, Adrian Hill",
26-
sitename="DifferentiationInterface.jl",
27-
format=Documenter.HTML(; assets=["assets/favicon.ico"]),
28-
pages=[
24+
modules = [DifferentiationInterface],
25+
authors = "Guillaume Dalle, Adrian Hill",
26+
sitename = "DifferentiationInterface.jl",
27+
format = Documenter.HTML(; assets = ["assets/favicon.ico"]),
28+
pages = [
2929
"Home" => "index.md",
3030
"Tutorials" => ["tutorials/basic.md", "tutorials/advanced.md"],
3131
"Explanation" => [
@@ -37,13 +37,13 @@ makedocs(;
3737
"api.md",
3838
"dev_guide.md",
3939
],
40-
plugins=[links],
40+
plugins = [links],
4141
)
4242

4343
deploydocs(;
44-
repo="github.com/JuliaDiff/DifferentiationInterface.jl",
45-
devbranch="main",
46-
dirname="DifferentiationInterface",
47-
tag_prefix="DifferentiationInterface-",
48-
push_preview=false,
44+
repo = "github.com/JuliaDiff/DifferentiationInterface.jl",
45+
devbranch = "main",
46+
dirname = "DifferentiationInterface",
47+
tag_prefix = "DifferentiationInterface-",
48+
push_preview = false,
4949
)

DifferentiationInterface/docs/src/assets/logo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ logo = begin
3232

3333
# Define center points and corners of triangle
3434
center = Point(0, 4)
35-
corners = ngon(center, 16, 3, -0.75π / 2; vertices=true)
35+
corners = ngon(center, 16, 3, -0.75π / 2; vertices = true)
3636

3737
# Draw three blended partials
3838
for (i, c) in enumerate(corners)
3939
b = blend(c, 0, center, 50, colors[i], black)
4040
setblend(b)
41-
text("", c; valign=:middle, halign=:center, angle=0.68π + 2π / 3 * i)
41+
text("", c; valign = :middle, halign = :center, angle = 0.68π + 2π / 3 * i)
4242
end
4343

4444
finish()

DifferentiationInterface/ext/DifferentiationInterfaceChainRulesCoreExt/reverse_onearg.jl

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
## Pullback
22

3-
struct ChainRulesPullbackPrepSamePoint{SIG,Y,PB} <: DI.PullbackPrep{SIG}
3+
struct ChainRulesPullbackPrepSamePoint{SIG, Y, PB} <: DI.PullbackPrep{SIG}
44
_sig::Val{SIG}
55
y::Y
66
pb::PB
77
end
88

99
function DI.prepare_pullback_nokwarg(
10-
strict::Val,
11-
f,
12-
backend::AutoReverseChainRules,
13-
x,
14-
ty::NTuple,
15-
contexts::Vararg{DI.GeneralizedConstant,C};
16-
) where {C}
10+
strict::Val,
11+
f,
12+
backend::AutoReverseChainRules,
13+
x,
14+
ty::NTuple,
15+
contexts::Vararg{DI.GeneralizedConstant, C}
16+
) where {C}
1717
_sig = DI.signature(f, backend, x, ty, contexts...; strict)
1818
return DI.NoPullbackPrep(_sig)
1919
end
2020

2121
function DI.prepare_pullback_same_point(
22-
f,
23-
prep::DI.NoPullbackPrep,
24-
backend::AutoReverseChainRules,
25-
x,
26-
ty::NTuple,
27-
contexts::Vararg{DI.GeneralizedConstant,C};
28-
) where {C}
22+
f,
23+
prep::DI.NoPullbackPrep,
24+
backend::AutoReverseChainRules,
25+
x,
26+
ty::NTuple,
27+
contexts::Vararg{DI.GeneralizedConstant, C}
28+
) where {C}
2929
DI.check_prep(f, prep, backend, x, ty, contexts...)
30-
_sig = DI.signature(f, backend, x, ty, contexts...; strict=DI.is_strict(prep))
30+
_sig = DI.signature(f, backend, x, ty, contexts...; strict = DI.is_strict(prep))
3131
rc = ruleconfig(backend)
3232
y, pb = rrule_via_ad(rc, f, x, map(DI.unwrap, contexts)...)
3333
return ChainRulesPullbackPrepSamePoint(_sig, y, pb)
3434
end
3535

3636
function DI.value_and_pullback(
37-
f,
38-
prep::DI.NoPullbackPrep,
39-
backend::AutoReverseChainRules,
40-
x,
41-
ty::NTuple,
42-
contexts::Vararg{DI.GeneralizedConstant,C},
43-
) where {C}
37+
f,
38+
prep::DI.NoPullbackPrep,
39+
backend::AutoReverseChainRules,
40+
x,
41+
ty::NTuple,
42+
contexts::Vararg{DI.GeneralizedConstant, C},
43+
) where {C}
4444
DI.check_prep(f, prep, backend, x, ty, contexts...)
4545
rc = ruleconfig(backend)
4646
y, pb = rrule_via_ad(rc, f, x, map(DI.unwrap, contexts)...)
@@ -51,13 +51,13 @@ function DI.value_and_pullback(
5151
end
5252

5353
function DI.value_and_pullback(
54-
f,
55-
prep::ChainRulesPullbackPrepSamePoint,
56-
backend::AutoReverseChainRules,
57-
x,
58-
ty::NTuple,
59-
contexts::Vararg{DI.GeneralizedConstant,C},
60-
) where {C}
54+
f,
55+
prep::ChainRulesPullbackPrepSamePoint,
56+
backend::AutoReverseChainRules,
57+
x,
58+
ty::NTuple,
59+
contexts::Vararg{DI.GeneralizedConstant, C},
60+
) where {C}
6161
DI.check_prep(f, prep, backend, x, ty, contexts...)
6262
(; y, pb) = prep
6363
tx = map(ty) do dy
@@ -67,13 +67,13 @@ function DI.value_and_pullback(
6767
end
6868

6969
function DI.pullback(
70-
f,
71-
prep::ChainRulesPullbackPrepSamePoint,
72-
backend::AutoReverseChainRules,
73-
x,
74-
ty::NTuple,
75-
contexts::Vararg{DI.GeneralizedConstant,C},
76-
) where {C}
70+
f,
71+
prep::ChainRulesPullbackPrepSamePoint,
72+
backend::AutoReverseChainRules,
73+
x,
74+
ty::NTuple,
75+
contexts::Vararg{DI.GeneralizedConstant, C},
76+
) where {C}
7777
DI.check_prep(f, prep, backend, x, ty, contexts...)
7878
(; pb) = prep
7979
tx = map(ty) do dy

DifferentiationInterface/ext/DifferentiationInterfaceDiffractorExt/DifferentiationInterfaceDiffractorExt.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ DI.pullback_performance(::AutoDiffractor) = DI.PullbackSlow()
1111
## Pushforward
1212

1313
function DI.prepare_pushforward_nokwarg(
14-
strict::Val, f, backend::AutoDiffractor, x, tx::NTuple
15-
)
14+
strict::Val, f, backend::AutoDiffractor, x, tx::NTuple
15+
)
1616
_sig = DI.signature(f, backend, x, tx; strict)
1717
return DI.NoPushforwardPrep(_sig)
1818
end
1919

2020
function DI.pushforward(
21-
f, prep::DI.NoPushforwardPrep, backend::AutoDiffractor, x, tx::NTuple
22-
)
21+
f, prep::DI.NoPushforwardPrep, backend::AutoDiffractor, x, tx::NTuple
22+
)
2323
DI.check_prep(f, prep, backend, x, tx)
2424
ty = map(tx) do dx
2525
# code copied from Diffractor.jl
@@ -31,8 +31,8 @@ function DI.pushforward(
3131
end
3232

3333
function DI.value_and_pushforward(
34-
f, prep::DI.NoPushforwardPrep, backend::AutoDiffractor, x, tx::NTuple
35-
)
34+
f, prep::DI.NoPushforwardPrep, backend::AutoDiffractor, x, tx::NTuple
35+
)
3636
DI.check_prep(f, prep, backend, x, tx)
3737
return f(x), DI.pushforward(f, prep, backend, x, tx)
3838
end

0 commit comments

Comments
 (0)