From 1e858172519e9339e4720b8bf9b39b6d9801e305 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Sat, 28 May 2022 19:29:08 -0700 Subject: Tweak around docstring to make prettier sphinx autodocs. --- text_utils.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'text_utils.py') diff --git a/text_utils.py b/text_utils.py index 46f3756..28ab755 100644 --- a/text_utils.py +++ b/text_utils.py @@ -307,12 +307,20 @@ def wrap_string(text: str, n: int) -> str: class Indenter(contextlib.AbstractContextManager): """ - with Indenter(pad_count = 8) as i: - i.print('test') - with i: - i.print('-ing') + Context manager that indents stuff (even recursively). e.g.:: + + with Indenter(pad_count = 8) as i: + i.print('test') with i: - i.print('1, 2, 3') + i.print('-ing') + with i: + i.print('1, 2, 3') + + Yields:: + + test + -ing + 1, 2, 3 """ -- cgit v1.3