File: dedent.py

package info (click to toggle)
graphql-relay 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 416 kB
  • sloc: python: 3,006; sh: 14; makefile: 4
file content (8 lines) | stat: -rw-r--r-- 206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
from textwrap import dedent as _dedent

__all__ = ["dedent"]


def dedent(text: str) -> str:
    """Fix indentation and also trim given text string."""
    return _dedent(text.lstrip("\n").rstrip(" \t\n"))