Add dedicated preview feature for East Asian Width (#4097)
This commit is contained in:
parent
61b529b7d1
commit
ce28be2705
@ -851,7 +851,7 @@ def is_line_short_enough( # noqa: C901
|
||||
if not line_str:
|
||||
line_str = line_to_string(line)
|
||||
|
||||
width = str_width if mode.preview else len
|
||||
width = str_width if Preview.respect_east_asian_width in mode else len
|
||||
|
||||
if Preview.multiline_string_handling not in mode:
|
||||
return (
|
||||
|
@ -195,6 +195,7 @@ class Preview(Enum):
|
||||
single_line_format_skip_with_multiple_comments = auto()
|
||||
long_case_block_line_splitting = auto()
|
||||
allow_form_feeds = auto()
|
||||
respect_east_asian_width = auto()
|
||||
|
||||
|
||||
class Deprecated(UserWarning):
|
||||
|
Loading…
Reference in New Issue
Block a user