Skip to content

Commit 2014f1a

Browse files
committed
Python 3.9 now warns on "is 0" which used to be proper. Change to ==.
1 parent 0a0aa24 commit 2014f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AdvancedHTMLParser/Formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def handle_starttag(self, tagName, attributeList, isSelfClosing=False):
175175
else:
176176
raise MultipleRootNodeException()
177177

178-
if self.inPreformatted is 0:
178+
if self.inPreformatted == 0:
179179
newTag._indent = self._getIndent()
180180

181181
if tagName in PREFORMATTED_TAGS:
@@ -406,7 +406,7 @@ def handle_starttag_slim(self, tagName, attributeList, isSelfClosing=False):
406406
else:
407407
raise MultipleRootNodeException()
408408

409-
if self.inPreformatted is 0:
409+
if self.inPreformatted == 0:
410410
newTag._indent = self._getIndent()
411411

412412
if tagName in PREFORMATTED_TAGS:

0 commit comments

Comments
 (0)