-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[BUG] box.py susceptible to breakage when commited with trailing-whitespace pre-commit hook #3049
Comments
I guess implicit line continuations would address that. I'd accept a PR. |
Any preferred style? eg. this works:
|
I was thinking this, so there would be no work at runtime: box = (
" ╷ "
" │ "
"╶─┼╴"
" │ "
"╶─┼╴"
"╶─┼╴"
" │ "
" ╵ "
) I hope black doesn't mangle that. If it does you may have to disable formatting for those lines. |
Black mangles that to one line. |
There's a comment you can add to disable formatting for a given block. Something line |
Also, it doesn't work anyway - it is read as a single line. |
I forgot the |
Ah yes - will work with |
This sort of thing works:
If that looks OK, I'll knock up a PR that changes all box definitions to use that format. |
Works for me. |
Describe the bug
We committed a copy of the rich module to a git repo as part of building an AWS lambda layer.
box.py got mangled by the pre-commit trailing-whitespace hook.
Would it be possible to redefine the box character definitions in a way that does not have trailing white space?
Platform
Click to expand
This was on a Mac, with python 3.10.12 and rich v13.4.2Other details not relevant to this issue.
The text was updated successfully, but these errors were encountered: