udim commented on a change in pull request #11038: [BEAM-7746] More typing fixes
URL: https://github.com/apache/beam/pull/11038#discussion_r394027007
 
 

 ##########
 File path: sdks/python/apache_beam/io/range_trackers.py
 ##########
 @@ -283,20 +313,28 @@ def try_split(self, position):
         return None
 
   def fraction_consumed(self):
+    # type: () -> float
     if self._last_claim is self.UNSTARTED:
       return 0
     else:
       return self.position_to_fraction(
           self._last_claim, self._start_position, self._stop_position)
 
+  @classmethod
+  def position_to_fraction(cls, key, start=None, end=None):
+    # type: (iobase.PositionT, Optional[iobase.PositionT], 
Optional[iobase.PositionT]) -> float
+    raise NotImplementedError
+
   def fraction_to_position(self, fraction, start, end):
+    # type: (float, Optional[iobase.PositionT], Optional[iobase.PositionT]) -> 
Optional[iobase.PositionT]
 
 Review comment:
   The return value seems to be non-Optional.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to