fix(lab): avoid runtime typing on Python 3.9
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ $ProgressPreference = "SilentlyContinue"
|
||||
|
||||
$RuntimeRoot = [IO.Path]::GetFullPath("D:\NDC_MISSIONCORE\runtime").TrimEnd("\")
|
||||
$BuildRoot = Join-Path $RuntimeRoot "staging\observatory-lab-v1-build-$SourceRevision"
|
||||
$SharedAdapterSha256 = "91c1878a58acf3ac35ce894f4de9b63cba3b7f29a65548e28df176063a2953c9"
|
||||
$SharedAdapterSha256 = "b7dcb3532a65ddc2d6988391056dd2f58f5f631a4db978ebfb5e170bde9c3916"
|
||||
$BuildMethod = "docker-commit-exact-layer-v1"
|
||||
$MaximumLayerBytes = [int64](16MB)
|
||||
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import zlib
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path, PurePosixPath
|
||||
from typing import Final, Literal, cast
|
||||
from typing import Final, Literal, Optional, cast
|
||||
|
||||
REQUEST_SCHEMA: Final = "missioncore.observatory-portable-lab-v1-component-request/v1"
|
||||
SOURCE_SCHEMA: Final = "missioncore.observatory-portable-lab-v1-source/v1"
|
||||
@@ -73,7 +73,7 @@ _CAMERA_JOB_ID = re.compile(r"^recorded-camera-[a-f0-9]{24}$")
|
||||
Component = Literal["eomt", "ddrnet"]
|
||||
AssetKind = Literal["file", "tree"]
|
||||
AssetVerification = Literal["sha256", "identity-sha256"]
|
||||
CommandRunner = Callable[[Sequence[str], Mapping[str, str] | None], None]
|
||||
CommandRunner = Callable[[Sequence[str], Optional[Mapping[str, str]]], None] # noqa: UP045
|
||||
|
||||
|
||||
class ComponentAdapterError(RuntimeError):
|
||||
@@ -792,7 +792,7 @@ def _paths(value: object, component: Component) -> dict[str, str | None]:
|
||||
_exact_keys(document, set(expected), "component paths")
|
||||
if document != expected:
|
||||
raise ComponentAdapterError("component path contract changed")
|
||||
return cast(dict[str, str | None], document)
|
||||
return cast(dict[str, Optional[str]], document) # noqa: UP045
|
||||
|
||||
|
||||
def _asset_bindings(
|
||||
|
||||
Reference in New Issue
Block a user