Black formats my code to:
operators: list[str]
| None = Query(
default=None,
description="operators",
),
but I want it to be formatted as:
operators: list[str] | None = Query(
default=None,
description="operators",
),
Black formatter adds a line break after the | None part in the code above. I'm curious why a line break occurs after the | operator. I'd like to know how to control or prevent such line breaks after the | operator in Black.
Additionally, I'm wondering if there are any options to change or rewrite the code so that Black doesn't introduce line breaks after the | operator in type hints.
I checked the black docs, but couldn't find it.