/opt/alt/python38/lib/python3.8/site-packages/click
NameSizeModeActions
__pycache__/-0755rm
core.py700850644editdlrm
decorators.py109410644editdlrm
exceptions.py67880644editdlrm
formatting.py88890644editdlrm
globals.py15150644editdlrm
parser.py155100644editdlrm
termui.py210080644editdlrm
testing.py110040644editdlrm
types.py188640644editdlrm
utils.py149160644editdlrm
_bashcomplete.py24230644editdlrm
_compat.py207060644editdlrm
_termui_impl.py163770644editdlrm
_textwrap.py11980644editdlrm
_unicodefun.py42650644editdlrm
_winconsole.py77900644editdlrm
__init__.py28580644editdlrm
Edit: /opt/alt/python38/lib/python3.8/site-packages/click/_textwrap.py (1198B)
import textwrap from contextlib import contextmanager class TextWrapper(textwrap.TextWrapper): def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width): space_left = max(width - cur_len, 1) if self.break_long_words: last = reversed_chunks[-1] cut = last[:space_left] res = last[space_left:] cur_line.append(cut) reversed_chunks[-1] = res elif not cur_line: cur_line.append(reversed_chunks.pop()) @contextmanager def extra_indent(self, indent): old_initial_indent = self.initial_indent old_subsequent_indent = self.subsequent_indent self.initial_indent += indent self.subsequent_indent += indent try: yield finally: self.initial_indent = old_initial_indent self.subsequent_indent = old_subsequent_indent def indent_only(self, text): rv = [] for idx, line in enumerate(text.splitlines()): indent = self.initial_indent if idx > 0: indent = self.subsequent_indent rv.append(indent + line) return '\n'.join(rv)