Use 'is None' instead of '== None'
This commit is contained in:
parent
dd98c1ec51
commit
f46671a85f
6 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue