Skip to content

Commit

Permalink
Use a type-compliant sentinel.
Browse files Browse the repository at this point in the history
  • Loading branch information
tvalentyn committed Jun 13, 2024
1 parent c291f4f commit d7da9d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/runners/worker/data_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def close(self):
class _GrpcDataChannel(DataChannel):
"""Base class for implementing a BeamFnData-based DataChannel."""

_WRITES_FINISHED = object()
_WRITES_FINISHED = beam_fn_api_pb2.Elements.Data()

def __init__(self, data_buffer_time_limit_ms=0):
# type: (int) -> None
Expand All @@ -475,7 +475,7 @@ def __init__(self, data_buffer_time_limit_ms=0):

def close(self):
# type: () -> None
self._to_send.put(self._WRITES_FINISHED) # type: ignore[arg-type]
self._to_send.put(self._WRITES_FINISHED)
self._closed = True

def wait(self, timeout=None):
Expand Down

0 comments on commit d7da9d3

Please sign in to comment.