type hint for python3.8

This commit is contained in:
2022-06-06 16:38:41 +08:00
parent 224a047da0
commit f6b3181142
2 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ from output.debug import DebugWriter
from protobuf import message_pb2, wss_pb2
if TYPE_CHECKING:
from typing import Type, Optional
from typing import Type, Optional, List
from output.IOutput import IOutput
from proxy.common import MessagePayload
@ -29,7 +29,7 @@ class OutputManager():
"xml": XMLWriter,
"debug": DebugWriter,
}
_writer: "list[IOutput]" = []
_writer: "List[IOutput]" = []
_thread: "Optional[threading.Thread]"= None
def __init__(self):
@ -56,7 +56,7 @@ class OutputManager():
for writer in self._writer:
writer.error_output("ParseError", message.body, e)
def decode_message(self, message_list: list[message_pb2.Message]):
def decode_message(self, message_list: "List[message_pb2.Message]"):
for message in message_list:
try:
if message.method == 'WebcastMemberMessage':