Dont use equality operators with None singleton in python files
This commit is contained in:
parent
970b58148f
commit
edcca5f7ad
9 changed files with 15 additions and 15 deletions
|
|
@ -82,7 +82,7 @@ def find_signal_descr(old_class, name):
|
|||
|
||||
def find_constant_descr(old_class, name):
|
||||
|
||||
if (old_class == None):
|
||||
if (old_class is None):
|
||||
return None
|
||||
constants = old_class.find("constants")
|
||||
if(constants != None and len(list(constants)) > 0):
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ def make_method(
|
|||
event=False,
|
||||
pp=None
|
||||
):
|
||||
if (declare or pp == None):
|
||||
if (declare or pp is None):
|
||||
t = '- '
|
||||
else:
|
||||
t = ""
|
||||
|
|
@ -405,7 +405,7 @@ def make_method(
|
|||
t += 'void'
|
||||
t += ' '
|
||||
|
||||
if declare or pp == None:
|
||||
if declare or pp is None:
|
||||
|
||||
s = '**' + method_data.attrib['name'] + '** '
|
||||
else:
|
||||
|
|
@ -577,7 +577,7 @@ def make_rst_class(node):
|
|||
make_method(f, name, m, True, True)
|
||||
f.write('\n')
|
||||
d = m.find('description')
|
||||
if d == None or d.text.strip() == '':
|
||||
if d is None or d.text.strip() == '':
|
||||
continue
|
||||
f.write(rstize_text(d.text.strip(), name))
|
||||
f.write("\n\n")
|
||||
|
|
@ -676,7 +676,7 @@ def make_rst_class(node):
|
|||
make_method(f, name, m, True)
|
||||
f.write('\n')
|
||||
d = m.find('description')
|
||||
if d == None or d.text.strip() == '':
|
||||
if d is None or d.text.strip() == '':
|
||||
continue
|
||||
f.write(rstize_text(d.text.strip(), name))
|
||||
f.write("\n\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue