Fix compatibility with python < 3.8 by switching from typing.Final to typing_extensions.Final
This commit is contained in:
parent
4a18f43253
commit
061ff796f6
@ -1,4 +1,5 @@
|
|||||||
from typing import Dict, Final, List
|
from typing import Dict, List
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
|
|
||||||
class CardCipherException(Exception):
|
class CardCipherException(Exception):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Final
|
from typing_extensions import Final
|
||||||
|
|
||||||
|
|
||||||
class GameConstants:
|
class GameConstants:
|
||||||
|
@ -2,7 +2,8 @@ import calendar
|
|||||||
import datetime
|
import datetime
|
||||||
from dateutil import tz
|
from dateutil import tz
|
||||||
|
|
||||||
from typing import List, Final, Optional
|
from typing import List, Optional
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
|
|
||||||
class Time:
|
class Time:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from typing import TYPE_CHECKING, Any, Dict, Final, List, Set, Optional
|
from typing import TYPE_CHECKING, Any, Dict, List, Set, Optional
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from .expression import Register
|
from .expression import Register
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from typing import TYPE_CHECKING, Any, Dict, Final, List, Tuple, Optional, Union
|
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Optional, Union
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
# Circular import otherwise
|
# Circular import otherwise
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from typing import Any, Final, List, Sequence, Union
|
from typing import Any, List, Sequence, Union
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from .expression import (
|
from .expression import (
|
||||||
Expression,
|
Expression,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import struct
|
import struct
|
||||||
from typing import Optional, Final, List, Dict, Any
|
from typing import Optional, List, Dict, Any
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from bemani.protocol.stream import InputStream, OutputStream
|
from bemani.protocol.stream import InputStream, OutputStream
|
||||||
from bemani.protocol.node import Node
|
from bemani.protocol.node import Node
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
import os
|
import os
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Generator, Final, List, MutableMapping, Optional, Set, Tuple
|
from typing import Generator, List, MutableMapping, Optional, Set, Tuple
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from .. import package_root
|
from .. import package_root
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import copy
|
import copy
|
||||||
import struct
|
import struct
|
||||||
from typing import Any, Dict, Final, List, Optional, Union
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
# Hack to get around mypy's lack of scoping on types.
|
# Hack to get around mypy's lack of scoping on types.
|
||||||
_renamed_float = float
|
_renamed_float = float
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import binascii
|
import binascii
|
||||||
import hashlib
|
import hashlib
|
||||||
from typing import Final, Optional
|
from typing import Optional
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from bemani.protocol.lz77 import Lz77
|
from bemani.protocol.lz77 import Lz77
|
||||||
from bemani.protocol.binary import BinaryEncoding
|
from bemani.protocol.binary import BinaryEncoding
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import copy
|
import copy
|
||||||
import struct
|
import struct
|
||||||
from typing import Any, Dict, Final, Iterator, List, Optional, Tuple
|
from typing import Any, Dict, Iterator, List, Optional, Tuple
|
||||||
|
from typing_extensions import Final
|
||||||
|
|
||||||
from bemani.protocol.stream import InputStream
|
from bemani.protocol.stream import InputStream
|
||||||
from bemani.protocol.node import Node
|
from bemani.protocol.node import Node
|
||||||
|
Loading…
Reference in New Issue
Block a user