summaryrefslogtreecommitdiff
path: root/solenv/gdb/boost
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-07-12 15:58:23 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-07-13 09:13:54 +0200
commit1f8a9bfcdb83446b49e74dba241f9924d3b74748 (patch)
tree5a4eeb17ab6d6b622989d2de02f2ada15a73b206 /solenv/gdb/boost
parent4c8f88bef948b18f3d810c29a7f83496367758a9 (diff)
Python: use is None/is not None instead of == None/!= None
Change-Id: I1c34181897506ad29a063865d752cb85ab76dbc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170408 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
Diffstat (limited to 'solenv/gdb/boost')
-rw-r--r--solenv/gdb/boost/lib/unordered.py4
-rw-r--r--solenv/gdb/boost/optional.py2
-rw-r--r--solenv/gdb/boost/ptr_container.py4
-rw-r--r--solenv/gdb/boost/smart_ptr.py2
-rw-r--r--solenv/gdb/boost/unordered.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/solenv/gdb/boost/lib/unordered.py b/solenv/gdb/boost/lib/unordered.py
index ee58d0481158..0182a1603265 100644
--- a/solenv/gdb/boost/lib/unordered.py
+++ b/solenv/gdb/boost/lib/unordered.py
@@ -55,7 +55,7 @@ class Unordered(object):
hash_buckets = hash_table.type.fields()[0]
assert hash_buckets.is_base_class
node_type = gdb.lookup_type("%s::node" % hash_buckets.type)
- assert node_type != None
+ assert node_type is not None
return node_type
class _iterator(six.Iterator):
@@ -91,7 +91,7 @@ class Unordered(object):
def _value(self):
assert self.node != self.bucket # bucket node has no value
- assert self.node != None
+ assert self.node is not None
node = self.node.dereference().cast(self.node_type)
return node['data_'].cast(self.value_type)
diff --git a/solenv/gdb/boost/optional.py b/solenv/gdb/boost/optional.py
index 08297254efc0..d32c272a70a2 100644
--- a/solenv/gdb/boost/optional.py
+++ b/solenv/gdb/boost/optional.py
@@ -41,7 +41,7 @@ printer = None
def build_pretty_printers():
global printer
- if printer != None:
+ if printer is not None:
return
printer = printing.Printer("boost.optional")
diff --git a/solenv/gdb/boost/ptr_container.py b/solenv/gdb/boost/ptr_container.py
index 425d812f54b5..9b61268302cf 100644
--- a/solenv/gdb/boost/ptr_container.py
+++ b/solenv/gdb/boost/ptr_container.py
@@ -48,7 +48,7 @@ class PtrStdPrinterBase(object):
self.sequence = None
def to_string(self):
- if self.sequence != None:
+ if self.sequence is not None:
length = len(self.sequence)
if length:
return "%s %s" % (self.typename, self.print_size(length))
@@ -223,7 +223,7 @@ printer = None
def build_pretty_printers():
global printer
- if printer != None:
+ if printer is not None:
return
printer = printing.Printer("boost.ptr_container")
diff --git a/solenv/gdb/boost/smart_ptr.py b/solenv/gdb/boost/smart_ptr.py
index 60d88278a5ac..3e97c57d4fef 100644
--- a/solenv/gdb/boost/smart_ptr.py
+++ b/solenv/gdb/boost/smart_ptr.py
@@ -57,7 +57,7 @@ printer = None
def build_pretty_printers():
global printer
- if printer != None:
+ if printer is not None:
return
printer = printing.Printer("boost.smart_ptr")
diff --git a/solenv/gdb/boost/unordered.py b/solenv/gdb/boost/unordered.py
index 2c56721857b8..1348ce9bbec7 100644
--- a/solenv/gdb/boost/unordered.py
+++ b/solenv/gdb/boost/unordered.py
@@ -94,7 +94,7 @@ printer = None
def build_pretty_printers():
global printer
- if printer != None:
+ if printer is not None:
return
printer = printing.Printer("boost.unordered")