-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Added test for the Khmer language #4253
base: main
Are you sure you want to change the base?
Conversation
67d565e
to
773396d
Compare
@rtb-zla-karma I hope this fixes your issue! Let me know if there's anything else to test here! (I apologize for the clumsy copy/paste I added in there, I just needed to get a line that was definitely over the limit.) |
diff-shades results comparing this PR (46e0a24) to main (8990023). The full diff is available in the logs under the "Generate HTML diff report" step.
|
It looks like this was an issue with the `_width_table.py` file being out of date in some way. Closes psf#4235.
Hi @KaiSforza . It works for me in my project. |
This would have to go in the preview style since it changes existing formatting. Not sure the best way to go about it though, since it looks like it'd be a lot of duplicated code. It might be better to just remember to rerun the script before each January release |
@RedGuy12 I'll see what I can do. Thanks for the input. Also, this is a bit of a weird bug, since in #3445 it seems like the if width == 1:
continue but the final committed version had a different statement: if width <= 1:
continue This is what is really causing the issue. If I hop into the squashed commit (ef6e079) and run the $ git status
HEAD detached at ef6e079
nothing to commit, working tree clean
$ python ./scripts/make_width_table.py
$ git diff --stat
src/black/_width_table.py | 364 +---------------------------------------------
1 file changed, 7 insertions(+), 357 deletions(-)
$ git show --oneline --stat kai/uniwidth
46e0a24 (kaictl/kai/uniwidth, kai/uniwidth) Added test for the Khmer language
CHANGES.md | 2 +
src/black/_width_table.py | 364 +--------------------
.../preview_long_strings__east_asian_width.py | 31 ++
3 files changed, 40 insertions(+), 357 deletions(-) To me, this kind of says "it's a bug" and points to not putting it in (check the commits in #3445 and note that the final commit doesn't change the |
773396d
to
46e0a24
Compare
I'm drafting this to do a full rewrite of the unicode character handling. Will probably just push into this same branch to fix it. |
Unfortunately, Black promises that formatting generally won't change throughout the calendar year, and this change wouldn't be an exception. See the Stability Policy for more details. |
That's fine, I'm honestly not sure what the best solution is for languages with ambiguous or non-standardized typesetting. |
Description
It looks like this was an issue with the
_width_table.py
file being out of date in some way.Closes #4235.
Checklist - did you ...
CHANGES.md
if necessary?