summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-20 21:01:09 +0100
committermathieui <mathieui@mathieui.net>2021-04-02 17:44:36 +0200
commit9ab0d250f4c1a7c9d525518076973c8f42bf8a70 (patch)
tree620790e4404706e180516e84cf6e6dfe0b844345
parent71ee1b85aa83131ab782bf48d619a5ff8f68d413 (diff)
downloadpoezio-9ab0d250f4c1a7c9d525518076973c8f42bf8a70.tar.gz
poezio-9ab0d250f4c1a7c9d525518076973c8f42bf8a70.tar.bz2
poezio-9ab0d250f4c1a7c9d525518076973c8f42bf8a70.tar.xz
poezio-9ab0d250f4c1a7c9d525518076973c8f42bf8a70.zip
fix: uniformize command_say signature
-rw-r--r--poezio/tabs/basetabs.py4
-rw-r--r--poezio/tabs/conversationtab.py2
-rw-r--r--poezio/tabs/muctab.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index fee54adb..564de62d 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -808,7 +808,7 @@ class ChatTab(Tab):
self.state = 'scrolled'
@command_args_parser.raw
- def command_say(self, line, correct=False):
+ def command_say(self, line: str, attention: bool = False, correct: bool = False):
pass
def goto_build_lines(self, new_date):
@@ -1063,7 +1063,7 @@ class OneToOneTab(ChatTab):
msg.send()
@command_args_parser.raw
- def command_say(self, line, correct=False, attention=False):
+ def command_say(self, line: str, attention: bool = False, correct: bool = False):
pass
@command_args_parser.ignored
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index 522e1d4d..2c0d9429 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -104,7 +104,7 @@ class ConversationTab(OneToOneTab):
@refresh_wrapper.always
@command_args_parser.raw
- def command_say(self, line, attention=False, correct=False):
+ def command_say(self, line: str, attention: bool = False, correct: bool = False):
msg = self.core.xmpp.make_message(
mto=self.get_dest_jid(),
mfrom=self.core.xmpp.boundjid
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index b6360e92..1991d70c 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1709,7 +1709,7 @@ class MucTab(ChatTab):
return None
@command_args_parser.raw
- def command_say(self, line: str, correct: bool = False) -> None:
+ def command_say(self, line: str, attention: bool = False, correct: bool = False):
"""
/say <message>
Or normal input + enter