summaryrefslogtreecommitdiff
path: root/libmat2/web.py
diff options
context:
space:
mode:
authorjvoisin2023-05-03 22:28:02 +0200
committerjvoisin2023-05-03 22:28:02 +0200
commit1b9608aecf25d5e58ee27b9b45afd7f77b883f8b (patch)
treebec20a8bc88dc81891a8c908090d3221cd0178b0 /libmat2/web.py
parent2ac8c24dac5431a39cdc091dec47ba594f509387 (diff)
Use proper type annotations instead of comments
Diffstat (limited to '')
-rw-r--r--libmat2/web.py6
1 files changed, 3 insertions, 3 deletions
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):
44 44
45 45
46class AbstractHTMLParser(abstract.AbstractParser): 46class AbstractHTMLParser(abstract.AbstractParser):
47 tags_blocklist = set() # type: Set[str] 47 tags_blocklist: Set[str] = set()
48 # In some html/xml-based formats some tags are mandatory, 48 # In some html/xml-based formats some tags are mandatory,
49 # so we're keeping them, but are discarding their content 49 # so we're keeping them, but are discarding their content
50 tags_required_blocklist = set() # type: Set[str] 50 tags_required_blocklist: Set[str] = set()
51 51
52 def __init__(self, filename): 52 def __init__(self, filename):
53 super().__init__(filename) 53 super().__init__(filename)
@@ -91,7 +91,7 @@ class _HTMLParser(parser.HTMLParser):
91 self.filename = filename 91 self.filename = filename
92 self.__textrepr = '' 92 self.__textrepr = ''
93 self.__meta = {} 93 self.__meta = {}
94 self.__validation_queue = [] # type: list[str] 94 self.__validation_queue: List[str] = list()
95 95
96 # We're using counters instead of booleans, to handle nested tags 96 # We're using counters instead of booleans, to handle nested tags
97 self.__in_dangerous_but_required_tag = 0 97 self.__in_dangerous_but_required_tag = 0