Skip to content

Commit 4d364aa

Browse files
committed
Add default value for Filter[]
1 parent 09d741c commit 4d364aa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

stubs/bleach/bleach/sanitizer.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from _typeshed import Incomplete
21
from collections.abc import Callable, Container, Iterable, Iterator
32
from re import Pattern
43
from typing import Final, Protocol, type_check_only
@@ -25,7 +24,7 @@ class NoCssSanitizerWarning(UserWarning): ...
2524

2625
@type_check_only
2726
class _FilterConstructor(Protocol):
28-
def __call__(self, *, source: BleachSanitizerFilter) -> Filter[Incomplete]: ...
27+
def __call__(self, *, source: BleachSanitizerFilter) -> Filter: ...
2928

3029
# _FilterConstructor used to be called _Filter
3130
# this alias is obsolete and can potentially be removed in the future

stubs/html5lib/html5lib/filters/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections.abc import Iterable, Iterator
22
from typing import Any, Generic, TypeVar
33

4-
_T = TypeVar("_T")
4+
_T = TypeVar("_T", default=Any)
55

66
class Filter(Generic[_T]):
77
source: Iterable[_T]

0 commit comments

Comments
 (0)