Skip to content

Classification

summ.shared.utils

dedent(text: str) -> str

A more lenient version of textwrap.dedent.

Source code in summ/shared/utils.py
1
2
3
4
def dedent(text: str) -> str:
    """A more lenient version of `textwrap.dedent`."""

    return "\n".join(map(str.strip, text.splitlines())).strip()