aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-11-19 17:08:10 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit0c599d0cd601bd491f4270a8ababab0ffe70b327 (patch)
tree453f68e1df657aced049a509378e6793d09df7ed
parent15ec647983d89c57dc920def4aad44d98ff70b23 (diff)
downloadwee-slack-0c599d0cd601bd491f4270a8ababab0ffe70b327.tar.gz
Move unnecessary constants from shared
-rw-r--r--slack/config.py1
-rw-r--r--slack/init.py11
-rw-r--r--slack/shared.py6
3 files changed, 8 insertions, 10 deletions
diff --git a/slack/config.py b/slack/config.py
index 68395be..5351569 100644
--- a/slack/config.py
+++ b/slack/config.py
@@ -293,7 +293,6 @@ class SlackConfig:
# WeeChat < 3.8 sends null as an empty string to callback_read, so in
# order to distinguish them, don't write the null values to the config
# See https://github.com/weechat/weechat/pull/1843
- print("version", shared.weechat_version)
callback_write = (
get_callback_name(config_section_workspace_write_for_old_weechat_cb)
if shared.weechat_version < 0x3080000
diff --git a/slack/init.py b/slack/init.py
index 38efa6e..8e1a433 100644
--- a/slack/init.py
+++ b/slack/init.py
@@ -5,6 +5,11 @@ from slack.shared import shared
from slack.task import create_task
from slack.util import get_callback_name
+SCRIPT_AUTHOR = "Trygve Aaberge <trygveaa@gmail.com>"
+SCRIPT_LICENSE = "MIT"
+SCRIPT_DESC = "Extends weechat for typing notification/search/etc on slack.com"
+REPO_URL = "https://github.com/wee-slack/wee-slack"
+
def shutdown_cb():
weechat.config_write(shared.config.weechat_config.pointer)
@@ -30,10 +35,10 @@ async def init():
def main():
if weechat.register(
shared.SCRIPT_NAME,
- shared.SCRIPT_AUTHOR,
+ SCRIPT_AUTHOR,
shared.SCRIPT_VERSION,
- shared.SCRIPT_LICENSE,
- shared.SCRIPT_DESC,
+ SCRIPT_LICENSE,
+ SCRIPT_DESC,
get_callback_name(shutdown_cb),
"",
):
diff --git a/slack/shared.py b/slack/shared.py
index 67d6c9c..68400a2 100644
--- a/slack/shared.py
+++ b/slack/shared.py
@@ -11,13 +11,7 @@ if TYPE_CHECKING:
class Shared:
def __init__(self):
self.SCRIPT_NAME = "slack"
- self.SCRIPT_AUTHOR = "Trygve Aaberge <trygveaa@gmail.com>"
self.SCRIPT_VERSION = "3.0.0"
- self.SCRIPT_LICENSE = "MIT"
- self.SCRIPT_DESC = (
- "Extends weechat for typing notification/search/etc on slack.com"
- )
- self.REPO_URL = "https://github.com/wee-slack/wee-slack"
self.weechat_version: int
self.weechat_callbacks: Dict[str, Any]