Format: application/octet-stream
⬇ Download File (1.8 KB)
   1  from typing import AnyStr, Dict, List, Pattern
   2  
   3  class TextWrapper(object):
   4      width: int = ...
   5      initial_indent: str = ...
   6      subsequent_indent: str = ...
   7      expand_tabs: bool = ...
   8      replace_whitespace: bool = ...
   9      fix_sentence_endings: bool = ...
  10      drop_whitespace: bool = ...
  11      break_long_words: bool = ...
  12      break_on_hyphens: bool = ...
  13  
  14      # Attributes not present in documentation
  15      sentence_end_re: Pattern[str] = ...
  16      wordsep_re: Pattern[str] = ...
  17      wordsep_simple_re: Pattern[str] = ...
  18      whitespace_trans: str = ...
  19      unicode_whitespace_trans: Dict[int, int] = ...
  20      uspace: int = ...
  21      x: int = ...
  22      def __init__(
  23          self,
  24          width: int = ...,
  25          initial_indent: str = ...,
  26          subsequent_indent: str = ...,
  27          expand_tabs: bool = ...,
  28          replace_whitespace: bool = ...,
  29          fix_sentence_endings: bool = ...,
  30          break_long_words: bool = ...,
  31          drop_whitespace: bool = ...,
  32          break_on_hyphens: bool = ...,
  33      ) -> None: ...
  34      def wrap(self, text: AnyStr) -> List[AnyStr]: ...
  35      def fill(self, text: AnyStr) -> AnyStr: ...
  36  
  37  def wrap(
  38      text: AnyStr,
  39      width: int = ...,
  40      initial_indent: AnyStr = ...,
  41      subsequent_indent: AnyStr = ...,
  42      expand_tabs: bool = ...,
  43      replace_whitespace: bool = ...,
  44      fix_sentence_endings: bool = ...,
  45      break_long_words: bool = ...,
  46      drop_whitespace: bool = ...,
  47      break_on_hyphens: bool = ...,
  48  ) -> List[AnyStr]: ...
  49  def fill(
  50      text: AnyStr,
  51      width: int = ...,
  52      initial_indent: AnyStr = ...,
  53      subsequent_indent: AnyStr = ...,
  54      expand_tabs: bool = ...,
  55      replace_whitespace: bool = ...,
  56      fix_sentence_endings: bool = ...,
  57      break_long_words: bool = ...,
  58      drop_whitespace: bool = ...,
  59      break_on_hyphens: bool = ...,
  60  ) -> AnyStr: ...
  61  def dedent(text: AnyStr) -> AnyStr: ...
  62