[Python] How to automatically break long string constants in Python code using Black formatter?

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    Python formatting guidelines, the famous PEP8 recommends no line longer than 79 chars.

    I can easily auto-format my code to a max line length with the Black Formatter, but it does not break long strings. The linter will still complain about a long URL in your code and Black won't help.

    Is it possible to automatically break long strings with Black formatter?

    Continue reading...

Compartilhe esta Página