mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 00:58:28 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Generator, Iterable, List, Text
|
||||
from typing import Any, Generator, Iterable, Text
|
||||
|
||||
class HTMLParser(object): # actually html5lib.HTMLParser
|
||||
def __getattr__(self, __name: Text) -> Any: ... # incomplete
|
||||
@@ -13,7 +13,7 @@ class HTMLSerializer(object): # actually html5lib.serializer.HTMLSerializer
|
||||
def __getattr__(self, __name: Text) -> Any: ... # incomplete
|
||||
|
||||
class BleachHTMLParser(HTMLParser):
|
||||
tags: List[Text] | None
|
||||
tags: list[Text] | None
|
||||
strip: bool
|
||||
consume_entities: bool
|
||||
def __init__(self, tags: Iterable[Text] | None, strip: bool, consume_entities: bool, **kwargs) -> None: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Container, Iterable, List, MutableMapping, Pattern, Protocol, Text
|
||||
from typing import Any, Container, Iterable, MutableMapping, Pattern, Protocol, Text
|
||||
|
||||
from .html5lib_shim import Filter
|
||||
|
||||
@@ -7,9 +7,9 @@ _Attrs = MutableMapping[Any, Text]
|
||||
class _Callback(Protocol):
|
||||
def __call__(self, attrs: _Attrs, new: bool = ...) -> _Attrs: ...
|
||||
|
||||
DEFAULT_CALLBACKS: List[_Callback]
|
||||
DEFAULT_CALLBACKS: list[_Callback]
|
||||
|
||||
TLDS: List[Text]
|
||||
TLDS: list[Text]
|
||||
|
||||
def build_url_re(tlds: Iterable[Text] = ..., protocols: Iterable[Text] = ...) -> Pattern[Text]: ...
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ from typing import Any, Callable, Container, Dict, Iterable, List, Pattern, Text
|
||||
|
||||
from .html5lib_shim import BleachHTMLParser, BleachHTMLSerializer, SanitizerFilter
|
||||
|
||||
ALLOWED_TAGS: List[Text]
|
||||
ALLOWED_ATTRIBUTES: Dict[Text, List[Text]]
|
||||
ALLOWED_STYLES: List[Text]
|
||||
ALLOWED_PROTOCOLS: List[Text]
|
||||
ALLOWED_TAGS: list[Text]
|
||||
ALLOWED_ATTRIBUTES: dict[Text, list[Text]]
|
||||
ALLOWED_STYLES: list[Text]
|
||||
ALLOWED_PROTOCOLS: list[Text]
|
||||
|
||||
INVISIBLE_CHARACTERS: Text
|
||||
INVISIBLE_CHARACTERS_RE: Pattern[Text]
|
||||
|
||||
Reference in New Issue
Block a user