summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2019-07-22 23:28:51 +0200
committerjvoisin2019-07-22 23:28:51 +0200
commit0c75cd15dc1a8c27eae6d7903f94665cc338b785 (patch)
tree7f96c0022a66518301e7365bead97dcf9cdc6e73
parent5280b6c2b3456a6083b5cf520796847b14225ed9 (diff)
Remove a mypy workaround to bump coverage back to 100%
-rw-r--r--libmat2/web.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmat2/web.py b/libmat2/web.py
index 91d5de1..b770200 100644
--- a/libmat2/web.py
+++ b/libmat2/web.py
@@ -97,10 +97,10 @@ class _HTMLParser(parser.HTMLParser):
97 self.tag_blocklist = blocklisted_tags 97 self.tag_blocklist = blocklisted_tags
98 98
99 def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]): 99 def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]):
100 original_tag = self.get_starttag_text() 100 # Ignore the type, because mypy is too stupid to infer
101 if not original_tag: # empty tag 101 # that get_starttag_text() can't return None.
102 return 102 original_tag = self.get_starttag_text() # type: ignore
103 self.__validation_queue.append(original_tag) 103 self.__validation_queue.append(original_tag) # type: ignore
104 104
105 if tag in self.tag_blocklist: 105 if tag in self.tag_blocklist:
106 self.__in_dangerous_tag += 1 106 self.__in_dangerous_tag += 1