diff options
| author | jvoisin | 2019-12-29 14:45:20 +0100 |
|---|---|---|
| committer | jvoisin | 2019-12-29 15:20:48 +0100 |
| commit | 693408f1a6ec6b41c9c60548a06b21af1e302647 (patch) | |
| tree | 6018fd20d006eef71a4562893a66ae7c608b7ca8 /libmat2 | |
| parent | 0902e9e330db3e85013a669f1e7aae51183ac581 (diff) | |
Please mypy
Mypy doesn't like some annotation in web.py,
this commits aims at pleasing it.
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/web.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmat2/web.py b/libmat2/web.py index 8843c1e..f11d379 100644 --- a/libmat2/web.py +++ b/libmat2/web.py | |||
| @@ -159,7 +159,8 @@ class _HTMLParser(parser.HTMLParser): | |||
| 159 | if data.strip(): | 159 | if data.strip(): |
| 160 | self.__textrepr += escape(data) | 160 | self.__textrepr += escape(data) |
| 161 | 161 | ||
| 162 | def handle_startendtag(self, tag: str, attrs: List[Tuple[str, str]]): | 162 | def handle_startendtag(self, tag: str, |
| 163 | attrs: List[Tuple[str, Optional[str]]]): | ||
| 163 | if tag in self.tag_required_blocklist | self.tag_blocklist: | 164 | if tag in self.tag_required_blocklist | self.tag_blocklist: |
| 164 | meta = {k:v for k, v in attrs} | 165 | meta = {k:v for k, v in attrs} |
| 165 | name = meta.get('name', 'harmful metadata') | 166 | name = meta.get('name', 'harmful metadata') |
