mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
apply suggestion Lib/_pyrepl/utils.py
Co-authored-by: grayjk <grayjk@gmail.com>
This commit is contained in:
parent
07aa4bcc8a
commit
41d2865a6d
1 changed files with 1 additions and 1 deletions
|
|
@ -64,9 +64,9 @@ def str_width(c: str) -> int:
|
|||
if ord(c) < 128:
|
||||
return 1
|
||||
# gh-139246 for zero-width joiner and combining characters
|
||||
category = unicodedata.category(c)
|
||||
if unicodedata.combining(c):
|
||||
return 0
|
||||
category = unicodedata.category(c)
|
||||
if category == "Cf" and c != "\u00ad":
|
||||
return 0
|
||||
if "\u2028" <= c <= "\u2029":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue