Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -1,8 +1,8 @@
from typing import IO, Any, Iterable, Tuple
from typing import IO, Any, Iterable
AS_IS: None
_FontType = Tuple[str, bool, bool, bool]
_StylesType = Tuple[Any, ...]
_FontType = tuple[str, bool, bool, bool]
_StylesType = tuple[Any, ...]
class NullFormatter:
writer: NullWriter | None
@@ -68,7 +68,7 @@ class NullWriter:
def new_font(self, font: _FontType) -> None: ...
def new_margin(self, margin: int, level: int) -> None: ...
def new_spacing(self, spacing: str | None) -> None: ...
def new_styles(self, styles: Tuple[Any, ...]) -> None: ...
def new_styles(self, styles: tuple[Any, ...]) -> None: ...
def send_paragraph(self, blankline: int) -> None: ...
def send_line_break(self) -> None: ...
def send_hor_rule(self, *args: Any, **kw: Any) -> None: ...
@@ -81,7 +81,7 @@ class AbstractWriter(NullWriter):
def new_font(self, font: _FontType) -> None: ...
def new_margin(self, margin: int, level: int) -> None: ...
def new_spacing(self, spacing: str | None) -> None: ...
def new_styles(self, styles: Tuple[Any, ...]) -> None: ...
def new_styles(self, styles: tuple[Any, ...]) -> None: ...
def send_paragraph(self, blankline: int) -> None: ...
def send_line_break(self) -> None: ...
def send_hor_rule(self, *args: Any, **kw: Any) -> None: ...