mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-20 00:47:52 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user