python: avoid equality check for None

PEP8 says that:
"Comparisons to singletons like None should always be done with is or
is not, never the equality operators."

glib uses a mix of "== None" and "is None". This patch changes all
cases to the latter.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2018-07-12 23:40:50 +02:00
parent c557c6de81
commit a8b416f9fe
7 changed files with 21 additions and 21 deletions

View File

@@ -116,21 +116,21 @@ def lookup_annotation(annotations, key):
def lookup_docs(annotations):
s = lookup_annotation(annotations, 'org.gtk.GDBus.DocString')
if s == None:
if s is None:
return ''
else:
return s
def lookup_since(annotations):
s = lookup_annotation(annotations, 'org.gtk.GDBus.Since')
if s == None:
if s is None:
return ''
else:
return s
def lookup_brief_docs(annotations):
s = lookup_annotation(annotations, 'org.gtk.GDBus.DocString.Short')
if s == None:
if s is None:
return ''
else:
return s