Skip to content

Commit cb6b22f

Browse files
author
Ricky Stewart
committed
Bug 1628954 - Don't use 'is' and 'is not' to perform comparison against strings in Python r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D71059 --HG-- extra : moz-landing-system : lando
1 parent 81fc120 commit cb6b22f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dom/bindings/GenerateCSS2PropertiesWebIDL.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def generate(output, idlFilename, dataFile):
2323
# (e.g. on nsComputedDOMStyle).
2424
extendedAttrs = ["CEReactions", "Throws",
2525
"SetterNeedsSubjectPrincipal=NonSystem"]
26-
if p.pref is not "":
26+
if p.pref != "":
2727
extendedAttrs.append('Pref="%s"' % p.pref)
2828

2929
prop = p.method

xpcom/ds/StaticAtoms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,11 +2582,11 @@ def generate_nsgkatomconsts_h(output, *ignore):
25822582
pseudo_count = 0
25832583
anon_box_count = 0
25842584
for i, atom in enumerate(STATIC_ATOMS):
2585-
if atom.atom_type is "PseudoElementAtom":
2585+
if atom.atom_type == "PseudoElementAtom":
25862586
if pseudo_index is None:
25872587
pseudo_index = i
25882588
pseudo_count += 1
2589-
elif atom.atom_type is "NonInheritingAnonBoxAtom" or atom.atom_type is "InheritingAnonBoxAtom":
2589+
elif atom.atom_type == "NonInheritingAnonBoxAtom" or atom.atom_type == "InheritingAnonBoxAtom":
25902590
if anon_box_index is None:
25912591
anon_box_index = i
25922592
anon_box_count += 1

0 commit comments

Comments
 (0)