Summary
winml inspect and winml sys have their own inline --format option definitions that predate the shared cli_utils.format_option() decorator introduced in #855. Unify them to use the shared decorator and OutputFormat type alias for consistency.
Commands to update
winml inspect — currently uses click.Choice(["table", "json"]) with default "table"
winml sys — currently uses click.Choice(["text", "json", "compact"]) with default "text"
Notes
inspect uses "table" instead of "text" as its non-JSON default — consider whether to rename to "text" for consistency or extend OutputFormat to include "table".
sys supports a third format "compact" — the shared decorator may need an optional extra_choices parameter, or sys can keep its own definition if the set of choices differs significantly.
- Update type annotations from
str to OutputFormat (or extended variant).
Related
Follow-up to #855 which introduced the shared format_option() and OutputFormat type.
Summary
winml inspectandwinml syshave their own inline--formatoption definitions that predate the sharedcli_utils.format_option()decorator introduced in #855. Unify them to use the shared decorator andOutputFormattype alias for consistency.Commands to update
winml inspect— currently usesclick.Choice(["table", "json"])with default"table"winml sys— currently usesclick.Choice(["text", "json", "compact"])with default"text"Notes
inspectuses"table"instead of"text"as its non-JSON default — consider whether to rename to"text"for consistency or extendOutputFormatto include"table".syssupports a third format"compact"— the shared decorator may need an optionalextra_choicesparameter, orsyscan keep its own definition if the set of choices differs significantly.strtoOutputFormat(or extended variant).Related
Follow-up to #855 which introduced the shared
format_option()andOutputFormattype.