Would it make sense to recommend de-indenting multi-line strings, as if inspect.cleandoc()
was used? Equivalent to what is done for docstrings.
My use case is deprecating a method in a class:
@deprecated(
"""
on_event is deprecated, use lifespan event handlers instead.
Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
"""
)
def on_event(
...
But by using a multiline string I can keep it a bit more tidy, but the text then starts with 8 spaces, so it doesn’t render great in the terminal nor in VS Code tooltips.
I might be approaching it incorrectly, but anyway, throwing the idea here.