summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-11 14:29:21 +0200
committermathieui <mathieui@mathieui.net>2021-04-11 16:33:53 +0200
commit6b2c12c16c74af6bef268d329bc70e520e8dcfbd (patch)
treec45a010d3173caecf9c04b8b3845462f8d705ffb
parentb729de91470d09d7bcd4956357b8192bda7a4981 (diff)
downloadpoezio-6b2c12c16c74af6bef268d329bc70e520e8dcfbd.tar.gz
poezio-6b2c12c16c74af6bef268d329bc70e520e8dcfbd.tar.bz2
poezio-6b2c12c16c74af6bef268d329bc70e520e8dcfbd.tar.xz
poezio-6b2c12c16c74af6bef268d329bc70e520e8dcfbd.zip
fix: do not use Literal
-rw-r--r--poezio/logger.py4
-rw-r--r--poezio/types.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/poezio/logger.py b/poezio/logger.py
index 0a7947db..d82ce9ee 100644
--- a/poezio/logger.py
+++ b/poezio/logger.py
@@ -20,7 +20,7 @@ from poezio.config import config
from poezio.xhtml import clean_text
from poezio.ui.types import Message, BaseMessage, LoggableTrait
from slixmpp import JID
-from poezio.types import TypedDict, Literal
+from poezio.types import TypedDict
import logging
@@ -68,7 +68,7 @@ class LogMessage(LogItem):
LogDict = TypedDict(
'LogDict',
{
- 'type': Literal['message', 'info'], 'txt': str, 'time': datetime,
+ 'type': str, 'txt': str, 'time': datetime,
'history': bool, 'nickname': str
},
total=False,
diff --git a/poezio/types.py b/poezio/types.py
index 66ce802f..8d727f46 100644
--- a/poezio/types.py
+++ b/poezio/types.py
@@ -1,8 +1,8 @@
"""Poezio type stuff"""
try:
- from typing import TypedDict, Literal
+ from typing import TypedDict
except ImportError:
- from typing_extensions import TypedDict, Literal
+ from typing_extensions import TypedDict
-__all__ = ['TypedDict', 'Literal']
+__all__ = ['TypedDict']