Skip to content
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

Adds ability to configure stderr output color #3426

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Oct 28, 2024

This feature will allow users to control the coloring of stderr with tox, including ability to avoiding adding colors to it, while still using colors as many tools are already producing colored output.

Please, make sure you address all the checklists (for details on how see
development documentation)! -->

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@ssbarnea ssbarnea force-pushed the feat/stderr-color branch 5 times, most recently from 799495c to 1db8f80 Compare October 29, 2024 09:37
@ssbarnea ssbarnea requested a review from gaborbernat October 29, 2024 10:06
@ssbarnea ssbarnea force-pushed the feat/stderr-color branch 3 times, most recently from cc8393f to 94417db Compare November 19, 2024 13:10
@ssbarnea ssbarnea marked this pull request as ready for review November 19, 2024 13:46
@ssbarnea ssbarnea enabled auto-merge (squash) November 19, 2024 13:46
@ssbarnea
Copy link
Member Author

@gaborbernat Can you have another look please? Thanks.

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build is failing so there's nothing to review yet that much

@gaborbernat gaborbernat marked this pull request as draft November 26, 2024 02:09
auto-merge was automatically disabled November 26, 2024 02:09

Pull request was converted to draft

@ssbarnea ssbarnea force-pushed the feat/stderr-color branch 2 times, most recently from d9cae0e to 9152d39 Compare December 10, 2024 17:10
@ssbarnea ssbarnea marked this pull request as ready for review December 11, 2024 10:14
@ssbarnea ssbarnea requested a review from gaborbernat December 11, 2024 10:14
@ssbarnea ssbarnea enabled auto-merge (squash) December 11, 2024 10:15
@@ -77,7 +87,7 @@ def test_local_execute_basic_pass( # noqa: PLR0913
out_got, err_got = out_err.read_out_err()
if show:
assert out_got == out
expected = (f"{Fore.RED}{err}{Fore.RESET}" if color else err) if err else ""
expected = f"{Fore.__dict__[stderr_color]}{err}{Fore.RESET}" if color and err else err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getattr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants