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

repr is erasing ANSI escapes codes #1870

Merged
merged 1 commit into from May 11, 2021

Conversation

AdrienPensart
Copy link

@AdrienPensart AdrienPensart commented May 4, 2021

This change will allow colors in argument hint.

What about str() vs f"{}" ?

Should I update : return " / ".join(repr(x) for x in hint_list) too ?

@davidism
Copy link
Member

Thanks for catching this, I fixed the other repr you pointed out. What's happening is that repr is escaping the non-printable control characters so that they're displayed as their string repr instead of controlling the terminal. repr was used as a shortcut for putting single quotes around things, so this might be something to change in other places as well.

@davidism davidism added this to the 8.0.0 milestone May 11, 2021
@davidism davidism merged commit 5215fc1 into pallets:master May 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow ANSI escapes codes in metavar hints
2 participants