Quizard/utils/utils.py
2025-04-15 22:09:15 +03:00

10 lines
229 B
Python

from typing import TypeVar
C = TypeVar("C", default=str)
V = TypeVar("V", default=str)
def indent(text: str, spaces: int = 2) -> str:
prefix = " " * spaces
return "\n".join(prefix + line for line in text.splitlines())