Description
cell_alignment currently requires Vector{Function}. Literal vectors of anonymous functions have a concrete element type (e.g. Vector{var"#1#2"}) and are not subtypes of Vector{Function} due to invariance, which leads to a TypeError.
|
cell_alignment::Union{Nothing, Vector{Pair{NTuple{2, Int}, Symbol}}, Vector{Function}} = nothing, |
Minimal repro
using PrettyTables
pretty_table(rand(3, 3);
cell_alignment = [(_, i, _) -> (:r, :c, :l)[i]]
)
Actual
ERROR: TypeError: in keyword argument cell_alignment,
expected Union{Nothing, Vector{Function}, Vector{Pair{Tuple{Int64,Int64},Symbol}}},
got a value of type Vector{var"#1#2"}
Env
- Julia: 1.10.10 (Windows)
- PrettyTables: v3.0.8
- Backend:
:text
I should have submitted this issue earlier so that you could incorporate it into 3.0.9.