diff options
author | mathieui <mathieui@mathieui.net> | 2019-10-27 20:04:11 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2019-10-27 20:04:11 +0100 |
commit | 8499f1cbc97c55dba6d47043972569df94f6a350 (patch) | |
tree | 6ab15d99fbabf76ffce1e1597825ebb20495f832 | |
parent | 5928f02bfc855fe3570e7916aa00a48cca9b6ef8 (diff) | |
download | poezio-8499f1cbc97c55dba6d47043972569df94f6a350.tar.gz poezio-8499f1cbc97c55dba6d47043972569df94f6a350.tar.bz2 poezio-8499f1cbc97c55dba6d47043972569df94f6a350.tar.xz poezio-8499f1cbc97c55dba6d47043972569df94f6a350.zip |
Fix syntax warnings (thanks python 3.8)
-rw-r--r-- | poezio/config.py | 4 | ||||
-rw-r--r-- | poezio/core/handlers.py | 4 | ||||
-rw-r--r-- | poezio/tabs/basetabs.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/poezio/config.py b/poezio/config.py index f8fcfd00..8da71071 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -308,7 +308,7 @@ class Config(RawConfigParser): begin, end = sections[section] pos = find_line(result_lines, begin, end, option) - if pos is -1: + if pos == -1: result_lines.insert(end, '%s = %s' % (option, value)) else: result_lines[pos] = '%s = %s' % (option, value) @@ -334,7 +334,7 @@ class Config(RawConfigParser): begin, end = sections[section] pos = find_line(result_lines, begin, end, option) - if pos is -1: + if pos == -1: log.error( 'Tried to remove a non-existing option %s' ' from section %s', option, section) diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index 1278e29e..fcd8d731 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -714,7 +714,7 @@ class HandlerCore: replaced = False if message.xml.find('{urn:xmpp:message-correct:0}replace') is not None: replaced_id = message['replace']['id'] - if replaced_id is not '' and config.get_by_tabname( + if replaced_id != '' and config.get_by_tabname( 'group_corrections', message['from'].bare): try: delayed_date = date or datetime.now() @@ -806,7 +806,7 @@ class HandlerCore: user = tab.parent_muc.get_user_by_name(with_nick) if message.xml.find('{urn:xmpp:message-correct:0}replace') is not None: replaced_id = message['replace']['id'] - if replaced_id is not '' and config.get_by_tabname( + if replaced_id != '' and config.get_by_tabname( 'group_corrections', room_from): try: tab.modify_message( diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 4b8a261f..7749de6c 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -1040,7 +1040,7 @@ class OneToOneTab(ChatTab): @command_args_parser.raw def command_attention(self, message): """/attention [message]""" - if message is not '': + if message != '': self.command_say(message, attention=True) else: msg = self.core.xmpp.make_message(self.get_dest_jid()) |