click_extra.config.flags module¶
Translate a configuration table into command-line flags.
- click_extra.config.flags.config_table_to_flags(table)[source]¶
Translate a mapping of configuration keys into long-form CLI flags.
For tools whose command-line options mirror their configuration keys but which cannot read the table themselves (no
--configsupport, no native config file). Follows the conventional mapping:key = True→--keykey = "value"(or a number) →--key=valuekey = ["a", "b"]→--key=a --key=b(one flag per item)key = Falseis skipped: there is no universal--no-<key>form.
Keys keep their spelling, so hyphenated keys map straight onto long options, and flags follow the mapping’s iteration order.