Skip to content

[html5lib] Minimal pyright fix for HTMLParser.__init__ #14251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion stubs/html5lib/html5lib/html5parser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from xml.etree.ElementTree import Element

from ._inputstream import _InputStream
from ._tokenizer import HTMLTokenizer
from .treebuilders.base import TreeBuilder

@overload
def parse(
Expand All @@ -21,7 +22,13 @@ class HTMLParser:
tree: Any
errors: list[Incomplete]
phases: Any
def __init__(self, tree=None, strict: bool = False, namespaceHTMLElements: bool = True, debug: bool = False) -> None: ...
def __init__(
self,
tree: str | type[TreeBuilder] | None = None,
strict: bool = False,
namespaceHTMLElements: bool = True,
debug: bool = False,
) -> None: ...
firstStartTag: bool
log: Any
compatMode: str
Expand Down