From baa0160109ef6349eb51aecd23d07db7744e64f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 8 May 2014 17:54:41 +0200 Subject: [PATCH] Fix conditions (use "is not") --- qweechat/buffer.py | 4 ++-- qweechat/weechat/protocol.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qweechat/buffer.py b/qweechat/buffer.py index cfe51fc..d4a7ef3 100644 --- a/qweechat/buffer.py +++ b/qweechat/buffer.py @@ -131,14 +131,14 @@ class BufferWidget(QtGui.QWidget): def set_title(self, title): """Set buffer title.""" self.title.clear() - if not title is None: + if title is not None: self.title.setText(title) def set_prompt(self, prompt): """Set prompt.""" if self.hbox_edit.count() > 1: self.hbox_edit.takeAt(0) - if not prompt is None: + if prompt is not None: label = QtGui.QLabel(prompt) label.setContentsMargins(0, 0, 5, 0) self.hbox_edit.insertWidget(0, label) diff --git a/qweechat/weechat/protocol.py b/qweechat/weechat/protocol.py index 95ddbe4..19d0e13 100644 --- a/qweechat/weechat/protocol.py +++ b/qweechat/weechat/protocol.py @@ -55,7 +55,7 @@ class WeechatObject: self.separator1 = '\n%s' % self.indent if separator == '\n' else '' def _str_value(self, v): - if type(v) is str and not v is None: + if type(v) is str and v is not None: return '\'%s\'' % v return str(v)