summaryrefslogtreecommitdiff
path: root/poezio
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 /poezio
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 'poezio')
-rw-r--r--poezio/config.py4
-rw-r--r--poezio/core/commands.py6
-rw-r--r--poezio/core/handlers.py2
-rw-r--r--poezio/fixes.py2
-rw-r--r--poezio/plugin_manager.py8
-rw-r--r--poezio/roster.py2
-rw-r--r--poezio/tabs/basetabs.py10
-rw-r--r--poezio/tabs/muctab.py2
-rw-r--r--poezio/tabs/rostertab.py2
9 files changed, 19 insertions, 19 deletions
diff --git a/poezio/config.py b/poezio/config.py
index c68e8452..155b11ba 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -280,7 +280,7 @@ class Config(RawConfigParser):
else:
sections, result_lines = result
- if not section in sections:
+ if section not in sections:
result_lines.append('[%s]' % section)
result_lines.append('%s = %s' % (option, value))
else:
@@ -304,7 +304,7 @@ class Config(RawConfigParser):
else:
sections, result_lines = result
- if not section in sections:
+ if section not in sections:
log.error('Tried to remove the option %s from a non-'
'existing section (%s)', option, section)
return True
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 65c8778f..94aad16f 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -115,7 +115,7 @@ class CommandCore:
if args is None:
return self.help('status')
- if not args[0] in POSSIBLE_SHOW.keys():
+ if args[0] not in POSSIBLE_SHOW.keys():
return self.help('status')
show = POSSIBLE_SHOW[args[0]]
@@ -562,7 +562,7 @@ class CommandCore:
if not section:
section = plugin_name
option = args[1]
- if not plugin_name in self.core.plugin_manager.plugins:
+ if plugin_name not in self.core.plugin_manager.plugins:
file_name = self.core.plugin_manager.plugins_conf_dir
file_name = os.path.join(file_name, plugin_name + '.cfg')
plugin_config = PluginConfig(file_name, plugin_name)
@@ -589,7 +589,7 @@ class CommandCore:
section = plugin_name
option = args[1]
value = args[2]
- if not plugin_name in self.core.plugin_manager.plugins:
+ if plugin_name not in self.core.plugin_manager.plugins:
file_name = self.core.plugin_manager.plugins_conf_dir
file_name = os.path.join(file_name, plugin_name + '.cfg')
plugin_config = PluginConfig(file_name, plugin_name)
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 5ecb742a..e7d62567 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -1347,7 +1347,7 @@ class HandlerCore:
return
cert = config.get('certificate')
# update the cert representation when it uses the old one
- if cert and not ':' in cert:
+ if cert and ':' not in cert:
cert = ':'.join(i + j for i, j in zip(cert[::2], cert[1::2])).upper()
config.set_and_save('certificate', cert)
diff --git a/poezio/fixes.py b/poezio/fixes.py
index 8259f5db..1eadac12 100644
--- a/poezio/fixes.py
+++ b/poezio/fixes.py
@@ -79,7 +79,7 @@ def _filter_add_receipt_request(self, stanza):
if stanza['request_receipt']:
return stanza
- if not stanza['type'] in self.ack_types:
+ if stanza['type'] not in self.ack_types:
return stanza
if stanza['receipt']:
diff --git a/poezio/plugin_manager.py b/poezio/plugin_manager.py
index f20797f0..fe4bce20 100644
--- a/poezio/plugin_manager.py
+++ b/poezio/plugin_manager.py
@@ -164,7 +164,7 @@ class PluginManager(object):
t = tab_type.__name__
if name in tab_type.plugin_commands:
return
- if not t in commands:
+ if t not in commands:
commands[t] = []
commands[t].append((name, handler, help, completion))
tab_type.plugin_commands[name] = Command(handler, help,
@@ -179,7 +179,7 @@ class PluginManager(object):
"""
commands = self.tab_commands[module_name]
t = tab_type.__name__
- if not t in commands:
+ if t not in commands:
return
for command in commands[t]:
if command[0] == name:
@@ -197,7 +197,7 @@ class PluginManager(object):
t = tab_type.__name__
if key in tab_type.plugin_keys:
return
- if not t in keys:
+ if t not in keys:
keys[t] = []
keys[t].append((key, handler))
tab_type.plugin_keys[key] = handler
@@ -211,7 +211,7 @@ class PluginManager(object):
"""
keys = self.tab_keys[module_name]
t = tab_type.__name__
- if not t in keys:
+ if t not in keys:
return
for _key in keys[t]:
if _key[0] == key:
diff --git a/poezio/roster.py b/poezio/roster.py
index 89925e07..b36442d6 100644
--- a/poezio/roster.py
+++ b/poezio/roster.py
@@ -214,7 +214,7 @@ class Roster(object):
group.remove(contact)
for group in contact.groups:
- if not group in self.groups:
+ if group not in self.groups:
self.groups[group] = RosterGroup(group, folded=group in self.folded_groups)
self.groups[group].add(contact)
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 7d449eae..98f4c977 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -143,7 +143,7 @@ class Tab(object):
@state.setter
def state(self, value):
- if not value in STATE_COLORS:
+ if value not in STATE_COLORS:
log.debug("Invalid value for tab state: %s", value)
elif STATE_PRIORITY[value] < STATE_PRIORITY[self._state] and \
value not in ('current', 'disconnected') and \
@@ -325,12 +325,12 @@ class Tab(object):
def update_commands(self):
for c in self.plugin_commands:
- if not c in self.commands:
+ if c not in self.commands:
self.commands[c] = self.plugin_commands[c]
def update_keys(self):
for k in self.plugin_keys:
- if not k in self.key_func:
+ if k not in self.key_func:
self.key_func[k] = self.plugin_keys[k]
def on_lose_focus(self):
@@ -858,10 +858,10 @@ class OneToOneTab(ChatTab):
def _feature_correct(self, features):
"Check for the 'correction' feature"
- if not 'urn:xmpp:message-correct:0' in features:
+ if 'urn:xmpp:message-correct:0' not in features:
if 'correct' in self.commands:
del self.commands['correct']
- elif not 'correct' in self.commands:
+ elif 'correct' not in self.commands:
self.register_command('correct', self.command_correct,
desc='Fix the last message with whatever you want.',
shortdesc='Correct the last message.',
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 6349b98e..4ba6d6d0 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -486,7 +486,7 @@ class MucTab(ChatTab):
nick = args[0]
color = args[1].lower()
user = self.get_user_by_name(nick)
- if not color in xhtml.colors and color not in ('unset', 'random'):
+ if color not in xhtml.colors and color not in ('unset', 'random'):
return self.core.information("Unknown color: %s" % color, 'Error')
if user and user.nick == self.own_nick:
return self.core.information("You cannot change the color of your"
diff --git a/poezio/tabs/rostertab.py b/poezio/tabs/rostertab.py
index 2aa2fa5a..a8d06391 100644
--- a/poezio/tabs/rostertab.py
+++ b/poezio/tabs/rostertab.py
@@ -609,7 +609,7 @@ class RosterInfoTab(Tab):
return
else:
jid = safeJID(args[0]).bare
- if not jid in [jid for jid in roster.jids()]:
+ if jid not in [jid for jid in roster.jids()]:
self.core.information('No subscription to deny', 'Warning')
return