From 1b9608aecf25d5e58ee27b9b45afd7f77b883f8b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 3 May 2023 22:28:02 +0200 Subject: Use proper type annotations instead of comments --- libmat2/web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmat2/web.py') diff --git a/libmat2/web.py b/libmat2/web.py index f2938e2..e33288e 100644 --- a/libmat2/web.py +++ b/libmat2/web.py @@ -44,10 +44,10 @@ class CSSParser(abstract.AbstractParser): class AbstractHTMLParser(abstract.AbstractParser): - tags_blocklist = set() # type: Set[str] + tags_blocklist: Set[str] = set() # In some html/xml-based formats some tags are mandatory, # so we're keeping them, but are discarding their content - tags_required_blocklist = set() # type: Set[str] + tags_required_blocklist: Set[str] = set() def __init__(self, filename): super().__init__(filename) @@ -91,7 +91,7 @@ class _HTMLParser(parser.HTMLParser): self.filename = filename self.__textrepr = '' self.__meta = {} - self.__validation_queue = [] # type: list[str] + self.__validation_queue: List[str] = list() # We're using counters instead of booleans, to handle nested tags self.__in_dangerous_but_required_tag = 0 -- cgit v1.3