Skip to content

Formatter: Unicode width is too high #6499

@konstin

Description

@konstin

The following snippet fits visually in pycharm and is kept in this layout by black

function_call(
    "aaaaaaaaaaaaaaaaaaaa", "我隻氣墊船裝滿晒鱔.txt", "मेरी मँडराने वाली नाव सर्पमीनों से भरी ह"
)

ruff formats it as

function_call(
    "aaaaaaaaaaaaaaaaaaaa",
    "我隻氣墊船裝滿晒鱔.txt",
    "मेरी मँडराने वाली नाव सर्पमीनों से भरी ह",
)

We likely compute the unicode width of the string too high so that we assume the line is too long

Metadata

Metadata

Assignees

Labels

formatterRelated to the formatterneeds-decisionAwaiting a decision from a maintainer

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions