Skip to content

Commit 1d257b6

Browse files
authored
format with JuliaFormatter v2 (#4)
1 parent 318c99a commit 1d257b6

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ makedocs(;
1616
clean=true,
1717
linkcheck=true,
1818
warnonly=:missing_docs,
19-
draft=!CI,
19+
draft=(!CI),
2020
doctest=false, # We test it in the CI, no need to run it here
2121
)
2222

src/DifferentialEquation.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ $(TYPEDSIGNATURES)
9090
9191
Return the dependent variables of `diff_eom`.
9292
"""
93-
Symbolics.get_variables(diff_eom::DifferentialEquation)::Vector{Num} =
94-
collect(keys(diff_eom.equations))
93+
Symbolics.get_variables(diff_eom::DifferentialEquation)::Vector{Num} = collect(
94+
keys(diff_eom.equations)
95+
)
9596

9697
"""
9798
$(TYPEDSIGNATURES)
@@ -100,8 +101,9 @@ Check if all equations in `diff_eom` are harmonic with respect to `t`. The funct
100101
differential equation system `diff_eom` and a variable `t`, and returns `true` if all equations
101102
are harmonic with respect to `t`, otherwise it returns `false`.
102103
"""
103-
QuestBase.is_harmonic(diff_eom::DifferentialEquation, t::Num)::Bool =
104-
all([is_harmonic(eq, t) for eq in values(diff_eom.equations)])
104+
QuestBase.is_harmonic(diff_eom::DifferentialEquation, t::Num)::Bool = all([
105+
is_harmonic(eq, t) for eq in values(diff_eom.equations)
106+
])
105107

106108
"""
107109
$(TYPEDSIGNATURES)

src/HarmonicEquation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ mutable struct HarmonicEquation
2121
# use a self-referential constructor with _parameters
2222
function HarmonicEquation(equations, variables, nat_eq)
2323
return (
24-
x = new(
24+
x=new(
2525
equations,
2626
variables,
2727
Num[],
2828
nat_eq,
2929
dummy_symbolic_Jacobian(length(variables)),
3030
);
31-
x.parameters = _parameters(x);
31+
x.parameters=_parameters(x);
3232
x
3333
)
3434
end

src/HarmonicVariable.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ function QuestBase.substitute_all(vars::Vector{HarmonicVariable}, rules)
9797
end
9898

9999
"Returns the symbols of a `HarmonicVariable`."
100-
get_variables_nums(vars::Vector{Num}) =
100+
function get_variables_nums(vars::Vector{Num})
101101
unique(flatten([Num.(get_variables(x)) for x in vars]))
102+
end
102103

103104
Symbolics.get_variables(var::HarmonicVariable)::Num = Num(first(get_variables(var.symbol)))
104105

105-
Base.isequal(v1::HarmonicVariable, v2::HarmonicVariable)::Bool =
106-
isequal(v1.symbol, v2.symbol)
106+
Base.isequal(v1::HarmonicVariable, v2::HarmonicVariable)::Bool = isequal(
107+
v1.symbol, v2.symbol
108+
)
107109

108110
"The derivative of f w.r.t. x of degree deg"
109111
function d(f::Num, x::Num, deg=1)::Num

0 commit comments

Comments
 (0)