Skip to content

Commit 4eecf0e

Browse files
FullyTypedAstraea Quinn S
authored andcommitted
Address comments
1 parent 08515f9 commit 4eecf0e

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

src/aws_durable_execution_sdk_python/concurrency/impl.py renamed to src/aws_durable_execution_sdk_python/concurrency/executor.py

File renamed without changes.

src/aws_durable_execution_sdk_python/operation/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Callable, Sequence
88
from typing import TYPE_CHECKING, Generic, TypeVar
99

10-
from aws_durable_execution_sdk_python.concurrency.impl import ConcurrentExecutor
10+
from aws_durable_execution_sdk_python.concurrency.executor import ConcurrentExecutor
1111
from aws_durable_execution_sdk_python.concurrency.models import (
1212
BatchResult,
1313
Executable,

src/aws_durable_execution_sdk_python/operation/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Callable, Sequence
88
from typing import TYPE_CHECKING, TypeVar
99

10-
from aws_durable_execution_sdk_python.concurrency.impl import ConcurrentExecutor
10+
from aws_durable_execution_sdk_python.concurrency.executor import ConcurrentExecutor
1111
from aws_durable_execution_sdk_python.concurrency.models import Executable
1212
from aws_durable_execution_sdk_python.config import ParallelConfig
1313
from aws_durable_execution_sdk_python.lambda_service import OperationSubType

src/aws_durable_execution_sdk_python/serdes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,9 @@ def encode(self, obj: Any) -> EncodedValue:
307307
return self.decimal_codec.encode(obj)
308308
case datetime() | date():
309309
return self.datetime_codec.encode(obj)
310-
case list() | tuple() | dict():
310+
case list() | tuple() | dict() | BatchResult():
311311
return self.container_codec.encode(obj)
312312
case _:
313-
if isinstance(obj, BatchResult):
314-
return self.container_codec.encode(obj)
315313
msg = f"Unsupported type: {type(obj)}"
316314
raise SerDesError(msg)
317315

tests/concurrency_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import pytest
1313

14-
from aws_durable_execution_sdk_python.concurrency.impl import (
14+
from aws_durable_execution_sdk_python.concurrency.executor import (
1515
ConcurrentExecutor,
1616
TimerScheduler,
1717
)
@@ -2519,7 +2519,7 @@ def create_child_context(operation_id):
25192519
executor_context.create_child_context = create_child_context
25202520

25212521
with patch(
2522-
"aws_durable_execution_sdk_python.concurrency.impl.child_handler",
2522+
"aws_durable_execution_sdk_python.concurrency.executor.child_handler",
25232523
patched_child_handler,
25242524
):
25252525
executor.execute(execution_state, executor_context)

tests/operation/parallel_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import pytest
88

9-
from aws_durable_execution_sdk_python.concurrency.impl import ConcurrentExecutor
9+
from aws_durable_execution_sdk_python.concurrency.executor import ConcurrentExecutor
1010

1111
# Mock the executor.execute method to return a BatchResult
1212
from aws_durable_execution_sdk_python.concurrency.models import (

0 commit comments

Comments
 (0)