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
This commit is contained in:
Ricky Stewart 2020-04-15 17:03:05 +00:00
parent 81fc12010b
commit cb6b22fac9
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ def generate(output, idlFilename, dataFile):
# (e.g. on nsComputedDOMStyle).
extendedAttrs = ["CEReactions", "Throws",
"SetterNeedsSubjectPrincipal=NonSystem"]
if p.pref is not "":
if p.pref != "":
extendedAttrs.append('Pref="%s"' % p.pref)
prop = p.method

View File

@ -2582,11 +2582,11 @@ def generate_nsgkatomconsts_h(output, *ignore):
pseudo_count = 0
anon_box_count = 0
for i, atom in enumerate(STATIC_ATOMS):
if atom.atom_type is "PseudoElementAtom":
if atom.atom_type == "PseudoElementAtom":
if pseudo_index is None:
pseudo_index = i
pseudo_count += 1
elif atom.atom_type is "NonInheritingAnonBoxAtom" or atom.atom_type is "InheritingAnonBoxAtom":
elif atom.atom_type == "NonInheritingAnonBoxAtom" or atom.atom_type == "InheritingAnonBoxAtom":
if anon_box_index is None:
anon_box_index = i
anon_box_count += 1