class MyHTMLParser: ... MyHTMLParser.handle_starttag # type: ignore[attr-defined] MyHTMLParser.handle_data # type: ignore[attr-defined]