diff options
Diffstat (limited to 'git_crecord/encoding.py')
-rw-r--r-- | git_crecord/encoding.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/git_crecord/encoding.py b/git_crecord/encoding.py index d023ff1..a431ec0 100644 --- a/git_crecord/encoding.py +++ b/git_crecord/encoding.py @@ -11,7 +11,6 @@ import unicodedata - # How to treat ambiguous-width characters. Set to 'WFA' to treat as wide. wide = "WF" @@ -20,7 +19,5 @@ def ucolwidth(d: str) -> int: """Find the column width of a Unicode string for display""" eaw = getattr(unicodedata, 'east_asian_width', None) if eaw is not None: - return sum([eaw(c) in wide and 2 or 1 for c in d]) + return sum(eaw(c) in wide and 2 or 1 for c in d) return len(d) - - |