Skip to content

Commit bbad7fe

Browse files
committed
chore(lint): use ternary, ignore unused param
1 parent 5ef9ae4 commit bbad7fe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

roundup/dehtml.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def handle_data(self, data):
6565

6666
self.text = self.text + data
6767

68-
def handle_starttag(self, tag, attrs):
68+
def handle_starttag(self, tag, attrs): # noqa: ARG002
6969
if (tag == "p"):
7070
self.text = self.text + "\n"
7171
if (tag in ("style", "script")):
@@ -86,10 +86,8 @@ def handle_entityref(self, name):
8686
self.text = self.text + " "
8787

8888
def html2text(html):
89-
if _pyver == 3:
90-
parser = DumbHTMLParser(convert_charrefs=True)
91-
else:
92-
parser = DumbHTMLParser()
89+
parser = DumbHTMLParser(
90+
convert_charrefs=True) if _pyver == 3 else DumbHTMLParser()
9391
parser.feed(html)
9492
parser.close()
9593
return parser.text

0 commit comments

Comments
 (0)