Remove a mypy workaround to bump coverage back to 100%
This commit is contained in:
parent
5280b6c2b3
commit
0c75cd15dc
@ -97,10 +97,10 @@ class _HTMLParser(parser.HTMLParser):
|
|||||||
self.tag_blocklist = blocklisted_tags
|
self.tag_blocklist = blocklisted_tags
|
||||||
|
|
||||||
def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]):
|
def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]):
|
||||||
original_tag = self.get_starttag_text()
|
# Ignore the type, because mypy is too stupid to infer
|
||||||
if not original_tag: # empty tag
|
# that get_starttag_text() can't return None.
|
||||||
return
|
original_tag = self.get_starttag_text() # type: ignore
|
||||||
self.__validation_queue.append(original_tag)
|
self.__validation_queue.append(original_tag) # type: ignore
|
||||||
|
|
||||||
if tag in self.tag_blocklist:
|
if tag in self.tag_blocklist:
|
||||||
self.__in_dangerous_tag += 1
|
self.__in_dangerous_tag += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user