Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -1,4 +1,4 @@
from typing import Callable, Dict, List, Pattern
from typing import Callable, Pattern
class TextWrapper:
width: int = ...
@@ -19,7 +19,7 @@ class TextWrapper:
wordsep_re: Pattern[str] = ...
wordsep_simple_re: Pattern[str] = ...
whitespace_trans: str = ...
unicode_whitespace_trans: Dict[int, int] = ...
unicode_whitespace_trans: dict[int, int] = ...
uspace: int = ...
x: str = ... # leaked loop variable
def __init__(
@@ -40,12 +40,12 @@ class TextWrapper:
) -> None: ...
# Private methods *are* part of the documented API for subclasses.
def _munge_whitespace(self, text: str) -> str: ...
def _split(self, text: str) -> List[str]: ...
def _fix_sentence_endings(self, chunks: List[str]) -> None: ...
def _handle_long_word(self, reversed_chunks: List[str], cur_line: List[str], cur_len: int, width: int) -> None: ...
def _wrap_chunks(self, chunks: List[str]) -> List[str]: ...
def _split_chunks(self, text: str) -> List[str]: ...
def wrap(self, text: str) -> List[str]: ...
def _split(self, text: str) -> list[str]: ...
def _fix_sentence_endings(self, chunks: list[str]) -> None: ...
def _handle_long_word(self, reversed_chunks: list[str], cur_line: list[str], cur_len: int, width: int) -> None: ...
def _wrap_chunks(self, chunks: list[str]) -> list[str]: ...
def _split_chunks(self, text: str) -> list[str]: ...
def wrap(self, text: str) -> list[str]: ...
def fill(self, text: str) -> str: ...
def wrap(
@@ -63,7 +63,7 @@ def wrap(
drop_whitespace: bool = ...,
max_lines: int = ...,
placeholder: str = ...,
) -> List[str]: ...
) -> list[str]: ...
def fill(
text: str,
width: int = ...,