-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: Use the full width of the terminal for output if it is less than the MAX_WIDTH setting #110
Conversation
… the MAX_WIDTH setting Fixes ewels#109
Welp, looks like the console of Github Actions maxes out at 80 while expected outputs are all set to 100. |
What about adding a new flag |
@ewels I considered that idea but I thought that it was beyond the scope of what I was initially trying to fix. Anyway, I'll give it another try 😁 |
- Fix ewels#109 by changing the behavior of MAX_WIDTH to still use the full width of the terminal if it is less than the limit - Add new flag WIDTH to take over the previous functionality of MAX_WIDTH - Adopt test expectations to new and modified configuration flags - Add new test for MAX_WIDTH Signed-off-by: Emmanuel Alap <15620712+ealap@users.noreply.github.com> # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch fix-max-width # Your branch is up to date with 'origin/fix-max-width'. # # Changes to be committed: # modified: README.md # modified: src/rich_click/rich_click.py # modified: src/rich_click/rich_help_configuration.py # modified: src/rich_click/rich_help_formatter.py # modified: tests/conftest.py # modified: tests/expectations/test_rich_click[test arguments with rich_config].config.json # modified: tests/expectations/test_rich_click[test arguments].config.json # modified: tests/expectations/test_rich_click[test custom errors help].config.json # modified: tests/expectations/test_rich_click[test custom errors with rich_config].config.json # modified: tests/expectations/test_rich_click[test declarative with rich_config].config.json # modified: tests/expectations/test_rich_click[test declarative].config.json # modified: tests/expectations/test_rich_click[test environment variables with rich_config].config.json # modified: tests/expectations/test_rich_click[test envvar].config.json # modified: tests/expectations/test_rich_click[test group sorting].config.json # modified: tests/expectations/test_rich_click[test groups sorting with rich_config].config.json # modified: tests/expectations/test_rich_click[test markdown with rich_config].config.json # modified: tests/expectations/test_rich_click[test markdown].config.json # modified: tests/expectations/test_rich_click[test metavars default with rich_config].config.json # modified: tests/expectations/test_rich_click[test metavars default].config.json # modified: tests/expectations/test_rich_click[test metavars with rich_config].config.json # modified: tests/expectations/test_rich_click[test metavars].config.json # modified: tests/expectations/test_rich_click[test rich markup with rich_config].config.json # modified: tests/expectations/test_rich_click[test rich markup].config.json # modified: tests/expectations/test_rich_click[test simple with rich_config].config.json # modified: tests/expectations/test_rich_click[test simple].config.json # modified: tests/expectations/test_rich_click[test table styles with rich_config].config.json # modified: tests/expectations/test_rich_click[test table styles].config.json # modified: tests/test_help.py #
Making sure this can still eventually get merged -- ealap#1 |
@dwreeves - now that you're a maintainer on this repo, I think that you should be able to push the changes you did to fix the merge conflicts already directly to this PR. Hopefully means we can get it ready to merge. |
Nice! I'll work on this (and a couple other open issues) without bugging you directly then. |
Thanks for the PR @ealap! |
Fixes #109
Let rich.console.Console set the width from current terminal width, then override it afterwards if MAX_WIDTH setting is smaller.