Class HTMLParser may not be initialized properly as method ParserBase.__init__ is not called from its __init__ method #95813
Labels
type-bug
An unexpected behavior, bug, or error
8000
Bug report
Hello,
I receive the error in the title from LGTM.com when subclassing the HTMLParser class. Should HTMLParser technically be calling:
super().__init__()
, or something similar, in its own initialiser? I know adding this call won't improve the functionality as the BaseParser initialiser does nothing of interest for subclasses, but I guess it would stop annoying errors like this.Relevant code is here:
cpython/Lib/html/parser.py
Lines 62 to 93 in eb81c1a
And here:
cpython/Lib/_markupbase.py
Lines 23 to 30 in eb81c1a
The text was updated successfully, but these errors were encountered: