Skip to content

Commit

Permalink
Show deprecation warning in --help in yellow (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 8, 2023
2 parents ac50eb8 + 1b62e5b commit 2d89377
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ options:
-h, --help show this help message and exit
-f {html,json,md,markdown,pretty,rst,csv,tsv,yaml}, --format {html,json,md,markdown,pretty,rst,csv,tsv,yaml}
deprecated: use direct options instead: --html, --json, --md, --pretty, --rst, --csv, --tsv or
--yaml.
--yaml
-c {yes,no,auto}, --color {yes,no,auto}
colour the output (default: auto)
--clear-cache clear cache before running
Expand Down
7 changes: 5 additions & 2 deletions src/norwegianblue/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ def main() -> None:
"tsv",
"yaml",
),
help="deprecated: use direct options instead: "
"--html, --json, --md, --pretty, --rst, --csv, --tsv or --yaml.",
help=colored(
"deprecated: use direct options instead: "
"--html, --json, --md, --pretty, --rst, --csv, --tsv or --yaml",
"yellow",
),
)
parser.add_argument(
"-c",
Expand Down

0 comments on commit 2d89377

Please sign in to comment.