Просмотр исходного кода

#338 remove Literal type to avoid problem with Python 3.7

Falko Schindler 2 лет назад
Родитель
Сommit
9cc45d9b9b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      nicegui/outbox.py

+ 2 - 2
nicegui/outbox.py

@@ -1,13 +1,13 @@
 import asyncio
 from collections import deque
-from typing import TYPE_CHECKING, Any, Deque, Literal, Tuple
+from typing import TYPE_CHECKING, Any, Deque, Tuple
 
 from . import globals
 
 if TYPE_CHECKING:
     from .element import Element
     ClientId = int
-    MessageType = Literal['update', 'run_method', 'run_javascript', 'open', 'notify']
+    MessageType = str
     MessageGroup = Tuple[ClientId, MessageType, Any]
 
 queue: Deque['MessageGroup'] = deque()