diff --git a/stubs/beautifulsoup4/METADATA.toml b/stubs/beautifulsoup4/METADATA.toml index 5c2d0f17b684..7b261bc19749 100644 --- a/stubs/beautifulsoup4/METADATA.toml +++ b/stubs/beautifulsoup4/METADATA.toml @@ -1,4 +1,5 @@ version = "4.11.*" +requires = ["types-html5lib"] [tool.stubtest] extras = ["lxml", "html5lib"] diff --git a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi index 3f46c4ed540b..1ee1b0e17f9c 100644 --- a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi +++ b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi @@ -1,6 +1,7 @@ from typing import Any from bs4.builder import HTMLTreeBuilder +from html5lib.treebuilders import base as treebuilder_base class HTML5TreeBuilder(HTMLTreeBuilder): NAME: str @@ -15,7 +16,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder): def create_treebuilder(self, namespaceHTMLElements): ... def test_fragment_to_document(self, fragment): ... -class TreeBuilderForHtml5lib(Any): # html5lib.treebuilders.base.TreeBuilder +class TreeBuilderForHtml5lib(treebuilder_base.TreeBuilder): soup: Any parser: Any store_line_numbers: Any @@ -42,7 +43,7 @@ class AttrList: def __getitem__(self, name): ... def __contains__(self, name): ... -class Element(Any): # html5lib.treebuilders.base.Node +class Element(treebuilder_base.Node): element: Any soup: Any namespace: Any