Skip to content

Commit

Permalink
Set expected max_width from 100 to 80
Browse files Browse the repository at this point in the history
  • Loading branch information
ealap authored Jun 12, 2023
1 parent 491f643 commit 3c0aaed
Show file tree
Hide file tree
Showing 47 changed files with 585 additions and 527 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def initialize_rich_click():
# each test
reload(rc)
# default config settings from https://github.com/Textualize/rich/blob/master/tests/render.py
rc.MAX_WIDTH = 100
rc.MAX_WIDTH = 80
rc.COLOR_SYSTEM = "truecolor"
rc.FORCE_TERMINAL = True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "dim",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Usage: cli [OPTIONS] INPUT
My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group subcommands.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────
│ * INPUT PATH [required]
╰──────────────────────────────────────────────────────────────────────────────────────────────────
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────
│ --type TEXT Type of file to sync [default: files]
│ --all Sync all the things?
│ --debug Enable debug mode
│ --help Show this message and exit.
╰──────────────────────────────────────────────────────────────────────────────────────────────────
Usage: cli [OPTIONS] INPUT
My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group
subcommands.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * INPUT PATH [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --type TEXT Type of file to sync [default: files] │
│ --all Sync all the things? │
│ --debug Enable debug mode │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "dim",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
33 changes: 17 additions & 16 deletions tests/expectations/test_rich_click[test arguments].out
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

Usage: cli [OPTIONS] INPUT

My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group subcommands.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
│ * INPUT PATH [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --type TEXT Type of file to sync [default: files] │
│ --all Sync all the things? │
│ --debug Enable debug mode │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Usage: cli [OPTIONS] INPUT

My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group
subcommands.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * INPUT PATH [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --type TEXT Type of file to sync [default: files] │
│ --all Sync all the things? │
│ --debug Enable debug mode │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "magenta italic",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
20 changes: 10 additions & 10 deletions tests/expectations/test_rich_click[test custom errors help].out
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Usage: cli [OPTIONS] INPUT
 Try running the '--help' flag for more information.  
╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────╮
│ Invalid usage │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
To find out more, visit ]8;id=0;foo\https://mytool.com]8;;\

Usage: cli [OPTIONS] INPUT

 Try running the '--help' flag for more information.  
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Invalid usage │
╰──────────────────────────────────────────────────────────────────────────────╯

To find out more, visit ]8;id=0;foo\https://mytool.com]8;;\

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "magenta italic",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

Usage: cli [OPTIONS] INPUT

 Try running the '--help' flag for more information.  
╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────╮
│ Invalid usage │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

To find out more, visit ]8;id=0;foo\https://mytool.com]8;;\

Usage: cli [OPTIONS] INPUT

 Try running the '--help' flag for more information.  
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Invalid usage │
╰──────────────────────────────────────────────────────────────────────────────╯

To find out more, visit ]8;id=0;foo\https://mytool.com]8;;\

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "dim",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Usage: cli [OPTIONS] COMMAND [ARGS]...
My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group subcommands.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────
│ --debug/--no-debug
│ --help Show this message and exit.
╰──────────────────────────────────────────────────────────────────────────────────────────────────
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────
│ sync Synchronise all your files between two places.
╰──────────────────────────────────────────────────────────────────────────────────────────────────
Usage: cli [OPTIONS] COMMAND [ARGS]...
My amazing tool does all the things.
This is a minimal example based on documentation from the 'click' package.
You can try using --help at the top level and also for specific group
subcommands.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --debug/--no-debug │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ sync Synchronise all your files between two places. │
╰──────────────────────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"align_errors_panel": "left",
"style_errors_suggestion": "dim",
"style_aborted": "red",
"max_width": 100,
"max_width": 80,
"color_system": "truecolor",
"force_terminal": true,
"header_text": null,
Expand Down
Loading

0 comments on commit 3c0aaed

Please sign in to comment.