From 1ac66903478dd9dd7d6b0749dd66f58deb3ec9fd Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Wed, 2 Oct 2024 12:33:36 -0400 Subject: [PATCH] Fix formats and lints --- .../runners/portability/fn_api_runner/worker_handlers.py | 2 +- sdks/python/apache_beam/transforms/userstate.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py b/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py index 1f1be3c176f98..d9e351472fb4c 100644 --- a/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py +++ b/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py @@ -1056,7 +1056,7 @@ def process_instruction_id(self, unused_instruction_id): yield def _get_one_interval_key(self, state_key, start): - # type: (...) -> str + # type: (...) -> bytes state_key_copy = beam_fn_api_pb2.StateKey() state_key_copy.CopyFrom(state_key) state_key_copy.ordered_list_user_state.range.start = start diff --git a/sdks/python/apache_beam/transforms/userstate.py b/sdks/python/apache_beam/transforms/userstate.py index 6fe83a6b7e920..8f1996819afe1 100644 --- a/sdks/python/apache_beam/transforms/userstate.py +++ b/sdks/python/apache_beam/transforms/userstate.py @@ -393,15 +393,12 @@ def add(self, value: Tuple[Timestamp, Any]) -> None: raise NotImplementedError(type(self)) def read_range( - self, - min_time_stamp: Timestamp, + self, min_time_stamp: Timestamp, limit_time_stamp: Timestamp) -> Iterable[Tuple[Timestamp, Any]]: raise NotImplementedError(type(self)) def clear_range( - self, - min_time_stamp: Timestamp, - limit_time_stamp: Timestamp) -> None: + self, min_time_stamp: Timestamp, limit_time_stamp: Timestamp) -> None: raise NotImplementedError(type(self))