You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/02/26 18:24:27 UTC

[GitHub] [beam] chadrik commented on a change in pull request #10822: [BEAM-7746] Minor typing updates / fixes

chadrik commented on a change in pull request #10822: [BEAM-7746] Minor typing updates / fixes
URL: https://github.com/apache/beam/pull/10822#discussion_r384678493
 
 

 ##########
 File path: sdks/python/apache_beam/io/iobase.py
 ##########
 @@ -1289,9 +1289,9 @@ class RestrictionProgress(object):
   """
   def __init__(self, **kwargs):
     # Only accept keyword arguments.
-    self._fraction = kwargs.pop('fraction', None)
-    self._completed = kwargs.pop('completed', None)
-    self._remaining = kwargs.pop('remaining', None)
+    self._fraction = kwargs.pop('fraction', None)  # type: Optional[float]
+    self._completed = kwargs.pop('completed', None)  # type: Optional[int]
 
 Review comment:
   I was a pretty confused by this class, and I think there may actually be some bugs in its handling of `None`-values, so I tried to do the bare minimum of what I thought was right.  No worries. I will revert this and leave this as a final typing task to someone who understands it. 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services