chadrik commented on a change in pull request #12881:
URL: https://github.com/apache/beam/pull/12881#discussion_r492493751



##########
File path: sdks/python/apache_beam/runners/worker/data_plane.py
##########
@@ -81,7 +85,11 @@
 
 class ClosableOutputStream(OutputStream):
   """A Outputstream for use with CoderImpls that has a close() method."""
-  def __init__(self, close_callback=None):
+  def __init__(
+      self,
+      close_callback=None  # type: Optional[Optional[Callable[[bytes], None]]]

Review comment:
       mistake.  fixed. 

##########
File path: sdks/python/apache_beam/runners/worker/bundle_processor.py
##########
@@ -119,10 +125,10 @@ class RunnerIOOperation(operations.Operation):
 
   def __init__(self,
                name_context,  # type: Union[str, common.NameContext]
-               step_name,
+               step_name,  # type: Any

Review comment:
       It looks like this argument isn't used at all any more.
   
   The inheritance tree looks like this:
   
   - `operations.Operation`: does not accept a `step_name` argument
     - `RunnerIOOperation`: calls `super`. does nothing with `step_name`
       - `DataOutputOperation`: does not override `__init__`
       - `DataInputOperation`:  calls `super`. does nothing with `step_name`
   
   

##########
File path: sdks/python/apache_beam/runners/worker/data_plane.py
##########
@@ -243,7 +274,7 @@ def output_stream(
       instruction_id,  # type: str
       transform_id  # type: str
   ):
-    # type: (...) -> ClosableOutputStream
+    # type: (...) -> SizeBasedBufferingClosableOutputStream

Review comment:
       fixed. 

##########
File path: sdks/python/apache_beam/runners/worker/data_plane.py
##########
@@ -218,7 +249,7 @@ class DataChannel(with_metaclass(abc.ABCMeta, object)):  # 
type: ignore[misc]
   @abc.abstractmethod
   def input_elements(self,
                      instruction_id,  # type: str
-                     expected_inputs,  # type: Collection[str]
+                     expected_inputs,  # type: Sized

Review comment:
       we only call `__len__`, but I'm happy to leave it as a collection.  
updated. 
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to