Commit 52429eab authored by jvoisin's avatar jvoisin

Fuck you pylint

parent 6eb65d52
Pipeline #23030 failed with stages
in 4 minutes and 4 seconds
......@@ -7,6 +7,7 @@ from . import abstract
assert Set
# pylint: disable=too-many-instance-attributes
class CSSParser(abstract.AbstractParser):
"""There is no such things as metadata in CSS files,
......@@ -131,7 +132,7 @@ class _HTMLParser(parser.HTMLParser):
self.__textrepr += escape(data)
def handle_startendtag(self, tag: str, attrs: List[Tuple[str, str]]):
if tag in (self.tag_required_blacklist | self.tag_blacklist):
if tag in self.tag_required_blacklist | self.tag_blacklist:
meta = {k:v for k, v in attrs}
name = meta.get('name', 'harmful metadata')
content = meta.get('content', 'harmful data')
......@@ -143,8 +144,8 @@ class _HTMLParser(parser.HTMLParser):
self.__textrepr += '<' + tag + ' />'
return
if 0 == self.__in_dangerous_but_required_tag:
if 0 == self.__in_dangerous_tag:
if self.__in_dangerous_but_required_tag == 0:
if self.__in_dangerous_tag == 0:
self.__textrepr += self.get_starttag_text()
def remove_all(self, output_filename: str) -> bool:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment