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 Any, BinaryIO, Callable, ClassVar, Dict, List, Mapping, Sequence, Text, TextIO
from typing import Any, BinaryIO, Callable, ClassVar, Mapping, Sequence, Text, TextIO
from typing_extensions import Literal
from xml.etree.ElementTree import Element
@@ -13,11 +13,11 @@ class Markdown:
postprocessors: Registry
parser: BlockParser
htmlStash: HtmlStash
output_formats: ClassVar[Dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
output_formats: ClassVar[dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
output_format: Literal["xhtml", "html"]
serializer: Callable[[Element], Text]
tab_length: int
block_level_elements: List[str]
block_level_elements: list[str]
def __init__(
self,
*,

View File

@@ -1,13 +1,13 @@
from typing import Any, Dict, List, Mapping, Tuple
from typing import Any, Mapping, Tuple
from markdown.core import Markdown
class Extension:
config: Mapping[str, List[Any]] = ...
config: Mapping[str, list[Any]] = ...
def __init__(self, **kwargs: Any) -> None: ...
def getConfig(self, key: str, default: Any = ...) -> Any: ...
def getConfigs(self) -> Dict[str, Any]: ...
def getConfigInfo(self) -> List[Tuple[str, str]]: ...
def getConfigs(self) -> dict[str, Any]: ...
def getConfigInfo(self) -> list[Tuple[str, str]]: ...
def setConfig(self, key: str, value: Any) -> None: ...
def setConfigs(self, items: Mapping[str, Any]) -> None: ...
def extendMarkdown(self, md: Markdown) -> None: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict
from typing import Any
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
@@ -18,7 +18,7 @@ class CodeHilite:
tab_length: Any
hl_lines: Any
use_pygments: Any
options: Dict[str, Any]
options: dict[str, Any]
def __init__(
self,
src: Any | None = ...,

View File

@@ -1,11 +1,11 @@
from typing import Any, List, Pattern
from typing import Any, Pattern
from . import util
def build_preprocessors(md, **kwargs): ...
class Preprocessor(util.Processor):
def run(self, lines: List[str]) -> List[str]: ...
def run(self, lines: list[str]) -> list[str]: ...
class NormalizeWhitespace(Preprocessor): ...