Browse Source

#338 remove Literal type to avoid problem with Python 3.7

Falko Schindler 2 years ago
parent
commit
9cc45d9b9b
1 changed files with 2 additions and 2 deletions
  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()