def remaining_time(self):
        """remaining time (as a timedelta) until complete at current rate"""
        if self.rate == 0:
            return None
        else:
            remaining_progress = self.done - self.current
            if self.rate == 0:
                if self.done == 0:
                    return 0
                else:
                    return None

            return remaining_progress / self.rate
def remaining_time ( self ) : if self . rate == 0 : return None else : remaining_progress = self . done - self . current if self . rate == 0 : if self . done == 0 : return 0 else : return None return remaining_progress / self . rate
remaining time (as a timedelta) until complete at current rate