Merge pull request #267 from fredj/coding_style
Minor coding style fixes
This commit is contained in:
commit
30b542906c
11 changed files with 12 additions and 12 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):
|
||||
|
|
|
@ -100,7 +100,7 @@ class Module(bumblebee.engine.Module):
|
|||
widget.set("visited", True)
|
||||
|
||||
for widget in widgets:
|
||||
if widget.get("visited") == False:
|
||||
if widget.get("visited") is False:
|
||||
widgets.remove(widget)
|
||||
|
||||
def get_ssid(self, intf):
|
||||
|
|
|
@ -105,12 +105,12 @@ class Module(bumblebee.engine.Module):
|
|||
if "<"+device+">" in line:
|
||||
found = True
|
||||
continue
|
||||
if found == False:
|
||||
if found is False:
|
||||
continue
|
||||
for pattern in self._patterns:
|
||||
if not pattern["expr"] in line:
|
||||
continue
|
||||
if pattern["callback"](line) == False and found == True:
|
||||
if pattern["callback"](line) is False and found == True:
|
||||
return
|
||||
except Exception:
|
||||
self._failed = True
|
||||
|
|
|
@ -49,7 +49,7 @@ class Module(bumblebee.engine.Module):
|
|||
num_shortcuts = min(len(cmds), len(labels))
|
||||
|
||||
# report possible problem as a warning
|
||||
if (len(cmds) is not len(labels)):
|
||||
if len(cmds) is not len(labels):
|
||||
logging.warning("shortcut: the number of commands does not match "\
|
||||
"the number of provided labels.")
|
||||
logging.warning("cmds : %s, labels : %s", cmds, labels)
|
||||
|
|
|
@ -66,7 +66,7 @@ class Module(bumblebee.engine.Module):
|
|||
except Exception:
|
||||
self._full_title = no_title
|
||||
|
||||
if(self._full_title is None):
|
||||
if self._full_title is None:
|
||||
self._full_title = no_title
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -150,7 +150,7 @@ class Module(bumblebee.engine.Module):
|
|||
band=bytefmt(nread)))
|
||||
|
||||
for widget in widgets:
|
||||
if widget.get("visited") == False:
|
||||
if widget.get("visited") is False:
|
||||
widgets.remove(widget)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -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