Skip to content

Commit 9a4f396

Browse files
authored
Merge pull request #97 from control-toolbox/auto-juliaformatter-pr
[AUTO] JuliaFormatter.jl run
2 parents d010a05 + 8daffae commit 9a4f396

5 files changed

Lines changed: 190 additions & 129 deletions

File tree

ext/default.jl

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,22 @@ __time_normalization() = :default
2626
$(TYPEDSIGNATURES)
2727
2828
"""
29-
__description() = (:state, :states,
30-
:costate, :costates,
31-
:control, :controls,
32-
:constraint, :constraints, :cons, :path,
33-
:dual, :duals)
29+
function __description()
30+
(
31+
:state,
32+
:states,
33+
:costate,
34+
:costates,
35+
:control,
36+
:controls,
37+
:constraint,
38+
:constraints,
39+
:cons,
40+
:path,
41+
:dual,
42+
:duals,
43+
)
44+
end
3445

3546
"""
3647
$(TYPEDSIGNATURES)
@@ -43,11 +54,11 @@ function __size_plot(
4354
control::Symbol,
4455
layout::Symbol,
4556
description::Symbol...;
46-
state_style::Union{NamedTuple, Symbol},
47-
control_style::Union{NamedTuple, Symbol},
48-
costate_style::Union{NamedTuple, Symbol},
49-
path_style::Union{NamedTuple, Symbol},
50-
dual_style::Union{NamedTuple, Symbol},
57+
state_style::Union{NamedTuple,Symbol},
58+
control_style::Union{NamedTuple,Symbol},
59+
costate_style::Union{NamedTuple,Symbol},
60+
path_style::Union{NamedTuple,Symbol},
61+
dual_style::Union{NamedTuple,Symbol},
5162
)
5263

5364
# set the default description if not given and then clean it
@@ -56,12 +67,12 @@ function __size_plot(
5667

5768
# check what to plot
5869
do_plot_state, do_plot_costate, do_plot_control, do_plot_path, do_plot_dual = do_plot(
59-
description...;
70+
description...;
6071
state_style=state_style,
6172
control_style=control_style,
6273
costate_style=costate_style,
6374
path_style=path_style,
64-
dual_style=dual_style
75+
dual_style=dual_style,
6576
)
6677

6778
#
@@ -103,11 +114,10 @@ function __size_plot(
103114
return (600, 280)
104115
elseif nb_lines==2
105116
return (600, 420)
106-
else
117+
else
107118
return (600, 140 * nb_lines)
108119
end
109120
end
110-
111121
end
112122

113123
"""

0 commit comments

Comments
 (0)