From 70ca5d3a7007ec53e20a28b7e2edacb2ec0547e7 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Fri, 18 Feb 2022 20:48:54 +0100 Subject: [PATCH] format files --- src/args.jl | 19 ++++++++----------- test/test_pipeline.jl | 3 ++- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/args.jl b/src/args.jl index b35be778..da105ea3 100644 --- a/src/args.jl +++ b/src/args.jl @@ -1748,20 +1748,17 @@ function slice_arg!( remove_pair::Bool, ) v = get(plotattributes_in, k, plotattributes_out[k]) - plotattributes_out[k] = - if haskey(plotattributes_in, k) && - !(k in _plot_args) - if typeof(v) <: AMat && - !isempty(v) - slice_arg(v, idx) - elseif typeof(v) <: NTuple{2, AMat} - (slice_arg(v[1], idx), slice_arg(v[2], idx)) - else - v - end + plotattributes_out[k] = if haskey(plotattributes_in, k) && !(k in _plot_args) + if typeof(v) <: AMat && !isempty(v) + slice_arg(v, idx) + elseif typeof(v) <: NTuple{2,AMat} + (slice_arg(v[1], idx), slice_arg(v[2], idx)) else v end + else + v + end if remove_pair RecipesPipeline.reset_kw!(plotattributes_in, k) end diff --git a/test/test_pipeline.jl b/test/test_pipeline.jl index 5311e39d..a345f93a 100644 --- a/test/test_pipeline.jl +++ b/test/test_pipeline.jl @@ -32,6 +32,7 @@ end @test plot(data4; NamedTuple{tuple(attribute)}(Ref(mat))...)[1][i][attribute] == [2(i - 1) + 1, 2i] end - @test plot(data4, ribbon = (mat, mat))[1][i][:ribbon] == ([2(i - 1) + 1, 2i], [2(i - 1) + 1, 2i]) + @test plot(data4, ribbon = (mat, mat))[1][i][:ribbon] == + ([2(i - 1) + 1, 2i], [2(i - 1) + 1, 2i]) end end