chadrik commented on a change in pull request #12881: URL: https://github.com/apache/beam/pull/12881#discussion_r491722936
########## File path: sdks/python/apache_beam/runners/worker/log_handler.py ########## @@ -156,9 +174,11 @@ def _write_log_entries(self): done = True log_entries.pop() if log_entries: - yield beam_fn_api_pb2.LogEntry.List(log_entries=log_entries) + yield beam_fn_api_pb2.LogEntry.List( + log_entries=cast(List[beam_fn_api_pb2.LogEntry], log_entries)) Review comment: we have to cast here because `log_entries` was initialized as a `List[Union[..., Sentinel]]`, and just above this line we checked for the sentinel and popped it out, but mypy can't track that. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org