---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__east_asian_width.py
---
## Input

```python
# The following strings do not have not-so-many chars, but are long enough
# when these are rendered in a monospace font (if the renderer respects
# Unicode East Asian Width properties).
hangul = '코드포인트 수는 적으나 실제 터미널이나 에디터에서 렌더링될 땐 너무 길어서 줄바꿈이 필요한 문자열'
hanzi = '中文測試：代碼點數量少，但在真正的終端模擬器或編輯器中呈現時太長，因此需要換行的字符串。'
japanese = 'コードポイントの数は少ないが、実際の端末エミュレータやエディタでレンダリングされる時は長すぎる為、改行が要る文字列'
```

## Black Differences

```diff
--- Black
+++ Ruff
@@ -1,16 +1,6 @@
 # The following strings do not have not-so-many chars, but are long enough
 # when these are rendered in a monospace font (if the renderer respects
 # Unicode East Asian Width properties).
-hangul = (
-    "코드포인트 수는 적으나 실제 터미널이나 에디터에서 렌더링될 땐 너무 길어서 줄바꿈이"
-    " 필요한 문자열"
-)
-hanzi = (
-    "中文測試：代碼點數量少，但在真正的終端模擬器或編輯器中呈現時太長，"
-    "因此需要換行的字符串。"
-)
-japanese = (
-    "コードポイントの数は少ないが、"
-    "実際の端末エミュレータやエディタでレンダリングされる時は長すぎる為、"
-    "改行が要る文字列"
-)
+hangul = "코드포인트 수는 적으나 실제 터미널이나 에디터에서 렌더링될 땐 너무 길어서 줄바꿈이 필요한 문자열"
+hanzi = "中文測試：代碼點數量少，但在真正的終端模擬器或編輯器中呈現時太長，因此需要換行的字符串。"
+japanese = "コードポイントの数は少ないが、実際の端末エミュレータやエディタでレンダリングされる時は長すぎる為、改行が要る文字列"
```

## Ruff Output

```python
# The following strings do not have not-so-many chars, but are long enough
# when these are rendered in a monospace font (if the renderer respects
# Unicode East Asian Width properties).
hangul = "코드포인트 수는 적으나 실제 터미널이나 에디터에서 렌더링될 땐 너무 길어서 줄바꿈이 필요한 문자열"
hanzi = "中文測試：代碼點數量少，但在真正的終端模擬器或編輯器中呈現時太長，因此需要換行的字符串。"
japanese = "コードポイントの数は少ないが、実際の端末エミュレータやエディタでレンダリングされる時は長すぎる為、改行が要る文字列"
```

## Black Output

```python
# The following strings do not have not-so-many chars, but are long enough
# when these are rendered in a monospace font (if the renderer respects
# Unicode East Asian Width properties).
hangul = (
    "코드포인트 수는 적으나 실제 터미널이나 에디터에서 렌더링될 땐 너무 길어서 줄바꿈이"
    " 필요한 문자열"
)
hanzi = (
    "中文測試：代碼點數量少，但在真正的終端模擬器或編輯器中呈現時太長，"
    "因此需要換行的字符串。"
)
japanese = (
    "コードポイントの数は少ないが、"
    "実際の端末エミュレータやエディタでレンダリングされる時は長すぎる為、"
    "改行が要る文字列"
)
```


