|
11 | 11 | import struct |
12 | 12 | import sys |
13 | 13 | import zipfile |
14 | | -from typing import BinaryIO, List, Literal, Optional, Tuple, TypedDict, Union |
| 14 | +from typing import BinaryIO, List, Literal, Tuple, TypedDict, Union |
15 | 15 |
|
16 | 16 | if sys.version_info < (3, 10): |
17 | 17 | from typing_extensions import TypeGuard |
@@ -127,7 +127,7 @@ def _firmware_metadata_is_v2( |
127 | 127 |
|
128 | 128 |
|
129 | 129 | async def _create_firmware_v1( |
130 | | - metadata: AnyFirmwareV1Metadata, archive: zipfile.ZipFile, name: Optional[str] |
| 130 | + metadata: AnyFirmwareV1Metadata, archive: zipfile.ZipFile, name: str | None |
131 | 131 | ) -> bytearray: |
132 | 132 | base = archive.open("firmware-base.bin").read() |
133 | 133 |
|
@@ -189,7 +189,7 @@ async def _create_firmware_v1( |
189 | 189 |
|
190 | 190 |
|
191 | 191 | async def _create_firmware_v2( |
192 | | - metadata: AnyFirmwareV2Metadata, archive: zipfile.ZipFile, name: Optional[str] |
| 192 | + metadata: AnyFirmwareV2Metadata, archive: zipfile.ZipFile, name: str | None |
193 | 193 | ) -> bytearray: |
194 | 194 | base = archive.open("firmware-base.bin").read() |
195 | 195 |
|
@@ -233,7 +233,7 @@ async def _create_firmware_v2( |
233 | 233 |
|
234 | 234 |
|
235 | 235 | async def create_firmware_blob( |
236 | | - firmware_zip: Union[str, os.PathLike, BinaryIO], name: Optional[str] = None |
| 236 | + firmware_zip: Union[str, os.PathLike, BinaryIO], name: str | None = None |
237 | 237 | ) -> Tuple[bytes, AnyFirmwareMetadata, str]: |
238 | 238 | """Creates a firmware blob from base firmware and an optional custom name. |
239 | 239 |
|
|
0 commit comments