Skip to content

Commit 1f5fdcb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 4375fb5 commit 1f5fdcb

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

stubs/bleach/bleach/html5lib_shim.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
from collections.abc import Iterator, Iterable
2-
from typing import Any
31
import re
2+
from collections.abc import Iterable, Iterator
3+
from typing import Any
44

55
# We don't re-export any `html5lib` types / values here, because they are not
66
# really public and may change at any time. This is just a helper module,
77
# import things directly from `html5lib` instead!
88
from html5lib import HTMLParser
9-
from html5lib.serializer import HTMLSerializer
10-
from html5lib._tokenizer import HTMLTokenizer
119
from html5lib._inputstream import HTMLUnicodeInputStream
10+
from html5lib._tokenizer import HTMLTokenizer
11+
from html5lib.serializer import HTMLSerializer
1212

1313
HTML_TAGS: list[str]
1414
HTML_TAGS_BLOCK_LEVEL: frozenset[str]

stubs/bleach/bleach/linkifier.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from collections.abc import Container, Iterable, MutableMapping, Sequence, Iterator
2+
from collections.abc import Container, Iterable, Iterator, Sequence
33
from re import Pattern
44
from typing import Any, Protocol
55
from typing_extensions import TypeAlias
@@ -47,7 +47,13 @@ class LinkifyFilter(Filter):
4747
url_re: re.Pattern[str]
4848
email_re: re.Pattern[str]
4949
def __init__(
50-
self, source, callbacks=..., skip_tags: Container[str] | None = ..., parse_email: bool = ..., url_re: re.Pattern[str] = ..., email_re: re.Pattern[str] = ...
50+
self,
51+
source,
52+
callbacks=...,
53+
skip_tags: Container[str] | None = ...,
54+
parse_email: bool = ...,
55+
url_re: re.Pattern[str] = ...,
56+
email_re: re.Pattern[str] = ...,
5157
) -> None: ...
5258
def apply_callbacks(self, attrs: _Attrs, is_new: bool) -> _Attrs: ...
5359
def extract_character_data(self, token_list: _Token) -> str: ...

stubs/bleach/bleach/sanitizer.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ from re import Pattern
33
from typing import Any
44
from typing_extensions import TypeAlias
55

6+
from html5lib.filters.base import Filter
7+
from html5lib.filters.sanitizer import Filter as SanitizerFilter
8+
69
from .css_sanitizer import CSSSanitizer
710
from .html5lib_shim import BleachHTMLParser, BleachHTMLSerializer
811
from .linkifier import _Token
9-
from html5lib.filters.sanitizer import Filter as SanitizerFilter
10-
from html5lib.filters.base import Filter
1112

1213
ALLOWED_TAGS: list[str]
1314
ALLOWED_ATTRIBUTES: dict[str, list[str]]

0 commit comments

Comments
 (0)