Skip to content

Commit f442cd0

Browse files
committed
fix format
1 parent a5c970a commit f442cd0

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/corva/handlers.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
StreamEventT = TypeVar("StreamEventT", bound=StreamEvent)
4242
ScheduledEventT = TypeVar("ScheduledEventT", bound=ScheduledEvent)
4343
HANDLERS: Dict[Type[RawBaseEvent], Callable] = {}
44-
GENERIC_APP_EVENT_TYPES = (RawStreamEvent, RawScheduledEvent, RawTaskEvent,)
44+
GENERIC_APP_EVENT_TYPES = (
45+
RawStreamEvent,
46+
RawScheduledEvent,
47+
RawTaskEvent,
48+
)
4549

4650

4751
def get_cache_key(
@@ -89,8 +93,8 @@ def wrapper(aws_event: Any, aws_context: Any) -> List[Any]:
8993
validate_app_type_context(aws_event, raw_event_type)
9094

9195
if (
92-
is_direct_app_call
93-
and data_transformation_type not in GENERIC_APP_EVENT_TYPES
96+
is_direct_app_call
97+
and data_transformation_type not in GENERIC_APP_EVENT_TYPES
9498
):
9599
CORVA_LOGGER.warning(
96100
f"Handler for {data_transformation_type.__name__!r} "

src/corva/validate_app_init.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import pydantic
88

99
from corva.models.base import AppType, RawBaseEvent
10-
from corva.models.merge.raw import RawPartialRerunMergeEvent
1110

1211

1312
def find_leaf_subclasses(base_class):

tests/unit/test_apps_event_types.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@
1212
)
1313
from corva.models.scheduled.scheduler_type import SchedulerType
1414
from corva.models.stream.log_type import LogType
15-
from corva.models.stream.raw import RawStreamEvent, RawStreamTimeEvent, RawTimeRecord, RawMetadata, RawAppMetadata, \
16-
RawStreamDepthEvent, RawDepthRecord
15+
from corva.models.stream.raw import (
16+
RawAppMetadata,
17+
RawDepthRecord,
18+
RawMetadata,
19+
RawStreamDepthEvent,
20+
RawStreamEvent,
21+
RawStreamTimeEvent,
22+
RawTimeRecord,
23+
)
1724
from corva.models.task import RawTaskEvent
1825
from corva.validate_app_init import (
1926
read_manifest,
@@ -160,9 +167,7 @@ def test__if_manifested_app_type_is_none__payload_based_validation_called(contex
160167
"corva.validate_app_init.validate_event_payload",
161168
wraps=validate_event_payload,
162169
) as mocked_validate_event_payload:
163-
validate_app_type_context(
164-
aws_event=task_event, raw_event_type=RawTaskEvent
165-
)
170+
validate_app_type_context(aws_event=task_event, raw_event_type=RawTaskEvent)
166171

167172
mocked_validate_event_payload.assert_called_once()
168173

0 commit comments

Comments
 (0)