From 7f2d9484f3694027f8adc962646d0dfb066bf0c9 Mon Sep 17 00:00:00 2001 From: Spider84pr Date: Mon, 13 Oct 2025 14:12:47 +0300 Subject: [PATCH] [html5lib] Add annotations for several functions in htmll5parser.py (#14859) --- stubs/html5lib/html5lib/html5parser.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stubs/html5lib/html5lib/html5parser.pyi b/stubs/html5lib/html5lib/html5parser.pyi index 804c10d58..ad3adaca4 100644 --- a/stubs/html5lib/html5lib/html5parser.pyi +++ b/stubs/html5lib/html5lib/html5parser.pyi @@ -48,16 +48,16 @@ class HTMLParser: def parse(self, stream: _InputStream, scripting: bool = ..., **kwargs): ... def parseFragment(self, stream: _InputStream, *args, **kwargs): ... def parseError(self, errorcode: str = "XXX-undefined-error", datavars=None) -> None: ... - def adjustMathMLAttributes(self, token) -> None: ... - def adjustSVGAttributes(self, token) -> None: ... - def adjustForeignAttributes(self, token) -> None: ... - def reparseTokenNormal(self, token) -> None: ... + def adjustMathMLAttributes(self, token: dict[str, Any]) -> None: ... + def adjustSVGAttributes(self, token: dict[str, Any]) -> None: ... + def adjustForeignAttributes(self, token: dict[str, Any]) -> None: ... + def reparseTokenNormal(self, token: dict[str, Any]) -> None: ... def resetInsertionMode(self) -> None: ... originalPhase: Incomplete def parseRCDataRawtext(self, token, contentType) -> None: ... def getPhases(debug): ... -def adjust_attributes(token, replacements) -> None: ... +def adjust_attributes(token: dict[str, Any], replacements: dict[str, Any]) -> None: ... def impliedTagToken( name: str, type: str = "EndTag", attributes: dict[str, Any] | None = None, selfClosing: bool = False ) -> dict[str, Any]: ...