Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring for the keyword argument backend is not consistent with the implementation #192

Open
daniel-thom opened this issue Oct 18, 2022 · 1 comment
Labels
doc Documentation good first issue Good for newcomers

Comments

@daniel-thom
Copy link

The docstring for pretty_table says

    backend::Union{Symbol, T_BACKENDS}: Select which back-end will be used to print the table (see the section Backend). Notice
       that the additional configuration in kwargs... depends on the selected backend.

but this no longer works in v2.1.2.

julia> pretty_table([1], backend = :text)
ERROR: TypeError: in keyword argument backend, expected Union{Val{:auto}, Val{:text}, Val{:html}, Val{:latex}}, got a value of type Symbol
Stacktrace:
 [1] _pretty_table(io::IO, data::Vector{Int64}; header::Nothing, kwargs::Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:backend,), Tuple{Symbol}}})
   @ PrettyTables ~/.julia/packages/PrettyTables/tUDry/src/private.jl:275
 [2] #pretty_table#60
   @ ~/.julia/packages/PrettyTables/tUDry/src/print.jl:702 [inlined]
 [3] top-level scope
   @ REPL[7]:1

It used to work in v1.3.1. I see that there was a breaking change in v2 and you need to pass backend = Val(:text) now.

@ronisbr
Copy link
Owner

ronisbr commented Nov 5, 2022

Hi @daniel-thom !

Ok, I will improve the documentation.

@ronisbr ronisbr added doc Documentation good first issue Good for newcomers labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants