From f46671a85f3c064b9b9fa0dca275bcf047ac2ef9 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 4 Jun 2018 14:50:51 +0200 Subject: [PATCH] Use 'is None' instead of '== None' --- bumblebee/engine.py | 2 +- bumblebee/modules/cmus.py | 2 +- bumblebee/modules/indicator.py | 2 +- bumblebee/modules/mpd.py | 2 +- bumblebee/modules/xrandr.py | 2 +- bumblebee/theme.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bumblebee/engine.py b/bumblebee/engine.py index e940039..85dc90f 100644 --- a/bumblebee/engine.py +++ b/bumblebee/engine.py @@ -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) diff --git a/bumblebee/modules/cmus.py b/bumblebee/modules/cmus.py index de638e4..ab01220 100644 --- a/bumblebee/modules/cmus.py +++ b/bumblebee/modules/cmus.py @@ -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): diff --git a/bumblebee/modules/indicator.py b/bumblebee/modules/indicator.py index a4d1712..3b57e33 100644 --- a/bumblebee/modules/indicator.py +++ b/bumblebee/modules/indicator.py @@ -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) diff --git a/bumblebee/modules/mpd.py b/bumblebee/modules/mpd.py index ff8ecd5..939f6e0 100644 --- a/bumblebee/modules/mpd.py +++ b/bumblebee/modules/mpd.py @@ -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): diff --git a/bumblebee/modules/xrandr.py b/bumblebee/modules/xrandr.py index 4f9236c..b01d6b6 100644 --- a/bumblebee/modules/xrandr.py +++ b/bumblebee/modules/xrandr.py @@ -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, diff --git a/bumblebee/theme.py b/bumblebee/theme.py index a75bada..08bb5ea 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -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):