diff options
| author | Scott Gasch <[email protected]> | 2022-05-28 19:29:08 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-05-28 19:29:08 -0700 |
| commit | 1e858172519e9339e4720b8bf9b39b6d9801e305 (patch) | |
| tree | 75306d5a4eb3a9b512646f0acc5c6174644348a6 /text_utils.py | |
| parent | 52ff365609d3f5a81cb79dc4464b19bd5860cfc0 (diff) | |
Tweak around docstring to make prettier sphinx autodocs.
Diffstat (limited to 'text_utils.py')
| -rw-r--r-- | text_utils.py | 18 |
1 files changed, 13 insertions, 5 deletions
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 """ |
