summaryrefslogtreecommitdiff
path: root/poezio/core/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-11 18:38:22 +0200
committermathieui <mathieui@mathieui.net>2021-04-11 18:38:22 +0200
commit57cd999f7081d94fb1c623665e016576725b5353 (patch)
tree3204c170a9de4fe7bd59b7b52fb5934a71dea969 /poezio/core/core.py
parent29a7c6eca555402e6c7aacbf5f523ce4f3f4a5c4 (diff)
downloadpoezio-57cd999f7081d94fb1c623665e016576725b5353.tar.gz
poezio-57cd999f7081d94fb1c623665e016576725b5353.tar.bz2
poezio-57cd999f7081d94fb1c623665e016576725b5353.tar.xz
poezio-57cd999f7081d94fb1c623665e016576725b5353.zip
refactor: move argument parsing away from config.py
global state--
Diffstat (limited to 'poezio/core/core.py')
-rw-r--r--poezio/core/core.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 5ea8978f..66af7a28 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -73,7 +73,6 @@ from poezio.core.structs import (
from poezio.ui.types import (
Message,
- InfoMessage,
PersistentInfoMessage,
)
@@ -81,12 +80,15 @@ log = logging.getLogger(__name__)
T = TypeVar('T', bound=tabs.Tab)
+
class Core:
"""
“Main” class of poezion
"""
- def __init__(self):
+ custom_version: str
+
+ def __init__(self, custom_version: str):
self.completion = CompletionCore(self)
self.command = CommandCore(self)
self.handler = HandlerCore(self)
@@ -100,7 +102,8 @@ class Core:
status = POSSIBLE_SHOW.get(status, None)
self.status = Status(show=status, message=config.getstr('status_message'))
self.running = True
- self.xmpp = connection.Connection()
+ self.custom_version = custom_version
+ self.xmpp = connection.Connection(custom_version)
self.xmpp.core = self
self.keyboard = keyboard.Keyboard()
roster.set_node(self.xmpp.client_roster)