Mercurial > p > roundup > code
changeset 7833:b68a1d8fd5d9
chore(lint): use ternary, ignore unused param
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 24 Mar 2024 15:25:53 -0400 |
| parents | b530069f3120 |
| children | dbeb6bf056c7 |
| files | roundup/dehtml.py |
| diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/dehtml.py Sun Mar 24 15:22:50 2024 -0400 +++ b/roundup/dehtml.py Sun Mar 24 15:25:53 2024 -0400 @@ -65,7 +65,7 @@ self.text = self.text + data - def handle_starttag(self, tag, attrs): + def handle_starttag(self, tag, attrs): # noqa: ARG002 if (tag == "p"): self.text = self.text + "\n" if (tag in ("style", "script")): @@ -86,10 +86,8 @@ self.text = self.text + " " def html2text(html): - if _pyver == 3: - parser = DumbHTMLParser(convert_charrefs=True) - else: - parser = DumbHTMLParser() + parser = DumbHTMLParser( + convert_charrefs=True) if _pyver == 3 else DumbHTMLParser() parser.feed(html) parser.close() return parser.text
