Correctly import Literal on Python 3.7

This commit is contained in:
Darren Burns
2022-04-07 09:36:17 +01:00
parent b44f507523
commit 8ff74e23ae

View File

@@ -11,7 +11,12 @@ from contextlib import suppress
from datetime import datetime, timezone
from json import JSONDecodeError
from pathlib import Path
from typing import cast, Iterable, Literal
from typing import cast, Iterable
if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal
from aiohttp import WSMessage, WSMsgType, WSCloseCode
from aiohttp.web import run_app