Skip to content

Commit 19b8010

Browse files
authored
Update JuliaFormatter to v2 (#224)
* Update formatter version * formatting changes by new formatter
1 parent 4736611 commit 19b8010

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/FormatCheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ on:
1111
jobs:
1212
format-check:
1313
name: "Format Check"
14-
uses: "QuantumKitHub/.github/.github/workflows/formatcheck.yml@main"
14+
uses: "QuantumKitHub/.github/.github/workflows/formatcheck.yml@main"
15+
with:
16+
juliaformatter-version: "2"

docs/make.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ mathengine = MathJax3(
4141
)
4242

4343
# examples pages
44-
examples_optimization =
45-
joinpath.(["heisenberg", "bose_hubbard", "xxz", "fermi_hubbard"], Ref("index.md"))
46-
examples_time_evolution =
47-
joinpath.(["heisenberg_su", "hubbard_su", "j1j2_su"], Ref("index.md"))
48-
examples_partition_functions =
49-
joinpath.(
50-
["2d_ising_partition_function", "3d_ising_partition_function"], Ref("index.md")
51-
)
44+
examples_optimization = joinpath.(
45+
["heisenberg", "bose_hubbard", "xxz", "fermi_hubbard"], Ref("index.md")
46+
)
47+
examples_time_evolution = joinpath.(
48+
["heisenberg_su", "hubbard_su", "j1j2_su"], Ref("index.md")
49+
)
50+
examples_partition_functions = joinpath.(
51+
["2d_ising_partition_function", "3d_ising_partition_function"], Ref("index.md")
52+
)
5253
examples_boundary_mps = joinpath.(["boundary_mps"], Ref("index.md"))
5354

5455
makedocs(;

src/algorithms/toolbox.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ passed through to `MPSKit.transfer_spectrum` (e.g. allowing to target the correl
272272
in a specific symmetry sector).
273273
274274
"""
275-
MPSKit.correlation_length(state, env::CTMRGEnv; num_vals=2, kwargs...) =
275+
function MPSKit.correlation_length(state, env::CTMRGEnv; num_vals=2, kwargs...)
276276
_correlation_length(env; num_vals, kwargs...)
277+
end
277278

278279
function _correlation_length(
279280
env::CTMRGEnv; num_vals=2, sector=one(sectortype(env)), kwargs...

src/utility/hook_pullback.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ the default `alg_rrule=nothing` results in the default AD pullback.
4444
!!! warning
4545
No tangent is expected for the `alg_rrule` argument
4646
"""
47-
_rrule(::Nothing, config::RuleConfig, f, args...; kwargs...) =
47+
function _rrule(::Nothing, config::RuleConfig, f, args...; kwargs...)
4848
rrule_via_ad(config, f, args...; kwargs...)
49+
end

0 commit comments

Comments
 (0)