Use 'is None' instead of '== None'

This commit is contained in:
Frederic Junod 2018-06-04 14:50:51 +02:00
parent dd98c1ec51
commit f46671a85f
6 changed files with 6 additions and 6 deletions

View file

@ -288,7 +288,7 @@ class Engine(object):
for module in self._modules:
self._current_module = module
module.update_wrapper(module.widgets())
if module.error == None:
if module.error is None:
if module.minimized():
widget = module.minimizedWidget()
widget.link_module(module)

View file

@ -49,7 +49,7 @@ class Module(bumblebee.engine.Module):
self._tags = defaultdict(lambda: '')
def hidden(self):
return self._status == None
return self._status is None
@scrollable
def description(self, widget):

View file

@ -18,7 +18,7 @@ class Module(bumblebee.engine.Module):
self.status = False
super(Module,self).__init__(engine, config, widgets)
self._include = tuple(filter(len, self.parameter("include", "NumLock,CapsLock").split(",")))
self._signalType = self.parameter("signaltype") if not self.parameter("signaltype") == None else "warning"
self._signalType = self.parameter("signaltype") if not self.parameter("signaltype") is None else "warning"
def update(self, widgets):
self._update_widgets(widgets)

View file

@ -56,7 +56,7 @@ class Module(bumblebee.engine.Module):
self._tags = defaultdict(lambda: '')
def hidden(self):
return self._status == None
return self._status is None
@scrollable
def description(self, widget):

View file

@ -64,7 +64,7 @@ class Module(bumblebee.engine.Module):
neighbor = first_neighbor if event["button"] == bumblebee.input.LEFT_MOUSE else last_neighbor
if neighbor == None:
if neighbor is None:
bumblebee.util.execute("{} --output {} --auto".format(toggle_cmd, widget.name))
else:
bumblebee.util.execute("{} --output {} --auto --{}-of {}".format(toggle_cmd, widget.name,

View file

@ -102,7 +102,7 @@ class Theme(object):
def icon(self, widget):
icon = self._get(widget, "icon", None)
if icon == None:
if icon is None:
return self._get(widget, "prefix", None)
def padding(self, widget):