summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-10-08 15:36:10 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-10-08 15:38:06 +0100
commitf1b94534a44cf2301e59c3da3cfb0f2ec0931b85 (patch)
treec8ac2221e7844c35db0df8f1011ee8a3e1fcb5e0 /plugins
parentb2b64426724bcbe6e58f7baab6434219fc8812ed (diff)
downloadpoezio-f1b94534a44cf2301e59c3da3cfb0f2ec0931b85.tar.gz
poezio-f1b94534a44cf2301e59c3da3cfb0f2ec0931b85.tar.bz2
poezio-f1b94534a44cf2301e59c3da3cfb0f2ec0931b85.tar.xz
poezio-f1b94534a44cf2301e59c3da3cfb0f2ec0931b85.zip
Change all “not … in …” into “… not in …”.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/irc.py4
-rw-r--r--plugins/otr.py2
-rw-r--r--plugins/reminder.py4
-rw-r--r--plugins/tell.py14
4 files changed, 12 insertions, 12 deletions
diff --git a/plugins/irc.py b/plugins/irc.py
index 42553dee..8a9f8946 100644
--- a/plugins/irc.py
+++ b/plugins/irc.py
@@ -355,12 +355,12 @@ class Plugin(BasePlugin):
self.api.information('The current tab does not appear to be an IRC one', 'Warning')
return None
if isinstance(current, tabs.OneToOneTab):
- if not '%' in current_jid.node:
+ if '%' not in current_jid.node:
server = current_jid.node
else:
ignored, server = current_jid.node.rsplit('%', 1)
elif isinstance(current, tabs.MucTab):
- if not '%' in current_jid.node:
+ if '%' not in current_jid.node:
server = current_jid.node
else:
ignored, server = current_jid.node.rsplit('%', 1)
diff --git a/plugins/otr.py b/plugins/otr.py
index 580a72c4..2a909293 100644
--- a/plugins/otr.py
+++ b/plugins/otr.py
@@ -544,7 +544,7 @@ class Plugin(BasePlugin):
Retrieve or create an OTR context
"""
jid = safeJID(jid)
- if not jid.full in self.contexts:
+ if jid.full not in self.contexts:
flags = POLICY_FLAGS.copy()
require = self.config.get_by_tabname('require_encryption',
jid.bare, default=False)
diff --git a/plugins/reminder.py b/plugins/reminder.py
index 8fc5eb0a..b26ca4a0 100644
--- a/plugins/reminder.py
+++ b/plugins/reminder.py
@@ -118,7 +118,7 @@ class Plugin(BasePlugin):
id_ = int(arg)
except:
return
- if not id_ in self.tasks:
+ if id_ not in self.tasks:
return
self.api.information('Task %s: %s [DONE]' % (id_, self.tasks[id_][1]), 'Info')
@@ -136,7 +136,7 @@ class Plugin(BasePlugin):
self.api.information(s, 'Info')
def remind(self, id_=0):
- if not id_ in self.tasks:
+ if id_ not in self.tasks:
return
self.api.information('Task %s: %s' % (id_, self.tasks[id_][1]), 'Info')
if self.config.get('beep', '') == 'true':
diff --git a/plugins/tell.py b/plugins/tell.py
index 02a091df..04fc12cd 100644
--- a/plugins/tell.py
+++ b/plugins/tell.py
@@ -49,10 +49,10 @@ class Plugin(BasePlugin):
self.tabs = {}
def on_join(self, presence, tab):
- if not tab in self.tabs:
+ if tab not in self.tabs:
return
nick = presence['from'].resource
- if not nick in self.tabs[tab]:
+ if nick not in self.tabs[tab]:
return
for i in self.tabs[tab][nick]:
tab.command_say("%s: %s" % (nick, i))
@@ -79,9 +79,9 @@ class Plugin(BasePlugin):
return
nick, msg = args
tab = self.api.current_tab()
- if not tab in self.tabs:
+ if tab not in self.tabs:
self.tabs[tab] = {}
- if not nick in self.tabs[tab]:
+ if nick not in self.tabs[tab]:
self.tabs[tab][nick] = []
self.tabs[tab][nick].append(msg)
self.api.information('Message for %s queued' % nick, 'Info')
@@ -89,17 +89,17 @@ class Plugin(BasePlugin):
def command_untell(self, args):
"""/untell <nick>"""
tab = self.api.current_tab()
- if not tab in self.tabs:
+ if tab not in self.tabs:
return
nick = args
- if not nick in self.tabs[tab]:
+ if nick not in self.tabs[tab]:
return
del self.tabs[tab][nick]
self.api.information('Messages for %s unqueued' % nick, 'Info')
def completion_untell(self, the_input):
tab = self.api.current_tab()
- if not tab in self.tabs:
+ if tab not in self.tabs:
return Completion(the_input.auto_completion, [], '')
return Completion(the_input.auto_completion, list(self.tabs[tab]), '', quotify=False)