mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 12:44:33 +08:00
[bleach] Add html5lib_shim.Filter__init__/__iter__ (#10835)
The missing __init__ method caused `Filter` to be incompatible with the `_Filter` protocol, preventing valid initialization of `Cleaner` instances. Closes: #10834
This commit is contained in:
1 parent
25eb99cbec
commit
af8c3a1b93
1 file changed
+5
-2
@@ -1,11 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Iterable
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
|
||||
class HTMLParser: # actually html5lib.HTMLParser
|
||||
def __getattr__(self, __name: str) -> Incomplete: ...
|
||||
|
||||
class Filter: # actually html5lib.filters.base.Filter
|
||||
def __getattr__(self, __name: str) -> Incomplete: ...
|
||||
source: Incomplete
|
||||
def __init__(self, source) -> None: ...
|
||||
def __iter__(self) -> Iterator[Incomplete]: ...
|
||||
def __getattr__(self, name: str) -> Incomplete: ... # copy attributes from source
|
||||
|
||||
class SanitizerFilter: # actually html5lib.filters.sanitizer.Filter
|
||||
def __getattr__(self, __name: str) -> Incomplete: ...
|
||||
|
||||
Reference in new issue
Block a user