diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-29 12:11:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 12:11:24 +0100 |
commit | 8650793eaca42c302dd9638c29caf39a3e152a50 (patch) | |
tree | a59922c89c0e1f1cddb2f63f69f7c58acf09dacd /doc/tools | |
parent | 69ccccaf719d488d3a5d3417265f8d822d0c970e (diff) | |
parent | edcca5f7ad2ba92b3e04fb153f7db55c08593469 (diff) |
Merge pull request #23317 from lupoDharkael/py-none
Dont use equality operators with None singleton in python files
Diffstat (limited to 'doc/tools')
-rw-r--r-- | doc/tools/doc_merge.py | 2 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 57ac4bdcdd..496d5dcb74 100644 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py @@ -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): diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index b3d6d32c26..7b7cc52547 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -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") |