mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
treewide: python-scripts: use is None
for none-equality
Testing for `None`-ness with `==` operator is frowned upon and causes warnings in at least "LGTM" python linter. Fix that. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
1e9a550ba4
commit
fe00366b63
@ -414,7 +414,7 @@ class Tests(object):
|
|||||||
elif ret == 'g' or 'g' in args:
|
elif ret == 'g' or 'g' in args:
|
||||||
# Real and complex.
|
# Real and complex.
|
||||||
have_complex = True
|
have_complex = True
|
||||||
if complex_func == None:
|
if complex_func is None:
|
||||||
complex_func = 'c%s' % func
|
complex_func = 'c%s' % func
|
||||||
# For narrowing macros, compute narrow_args, the list of
|
# For narrowing macros, compute narrow_args, the list of
|
||||||
# argument types for which there is an actual corresponding
|
# argument types for which there is an actual corresponding
|
||||||
@ -462,7 +462,7 @@ class Tests(object):
|
|||||||
continue
|
continue
|
||||||
if t.complex and not have_complex:
|
if t.complex and not have_complex:
|
||||||
continue
|
continue
|
||||||
if func == None and not t.complex:
|
if func is None and not t.complex:
|
||||||
continue
|
continue
|
||||||
if ret == 's' and t.name.startswith('_Float'):
|
if ret == 's' and t.name.startswith('_Float'):
|
||||||
continue
|
continue
|
||||||
@ -544,7 +544,7 @@ class Tests(object):
|
|||||||
all_conds.append(can_comb)
|
all_conds.append(can_comb)
|
||||||
if narrowing:
|
if narrowing:
|
||||||
all_conds.append(narrow_cond)
|
all_conds.append(narrow_cond)
|
||||||
any_complex = func == None
|
any_complex = func is None
|
||||||
for t in this_args:
|
for t in this_args:
|
||||||
if t.complex:
|
if t.complex:
|
||||||
any_complex = True
|
any_complex = True
|
||||||
|
@ -587,7 +587,7 @@ def register(objfile):
|
|||||||
printer.add_printer('pthread_rwlockattr_t', r'^pthread_rwlockattr_t$',
|
printer.add_printer('pthread_rwlockattr_t', r'^pthread_rwlockattr_t$',
|
||||||
RWLockAttributesPrinter)
|
RWLockAttributesPrinter)
|
||||||
|
|
||||||
if objfile == None:
|
if objfile is None:
|
||||||
objfile = gdb
|
objfile = gdb
|
||||||
|
|
||||||
gdb.printing.register_pretty_printer(objfile, printer)
|
gdb.printing.register_pretty_printer(objfile, printer)
|
||||||
|
Loading…
Reference in New Issue
Block a user