@@ -611,13 +611,17 @@ def __init__(self) -> None:
611611 self .error_lines : List [str ] = []
612612 self .other_lines : List [str ] = []
613613
614- def _parse_progress_line (self , line : AnyStr ) -> None :
614+ def _parse_progress_line (self , line : AnyStr ) -> Optional [ object ] :
615615 """Parse progress information from the given line as retrieved by
616616 :manpage:`git-push(1)` or :manpage:`git-fetch(1)`.
617617
618618 - Lines that do not contain progress info are stored in :attr:`other_lines`.
619619 - Lines that seem to contain an error (i.e. start with ``error:`` or ``fatal:``)
620620 are stored in :attr:`error_lines`.
621+
622+ The base implementation returns ``None``. Subclasses may return another
623+ value for compatibility with existing overrides, but callers should treat
624+ the return value as unspecified.
621625 """
622626 # handle
623627 # Counting objects: 4, done.
@@ -632,7 +636,7 @@ def _parse_progress_line(self, line: AnyStr) -> None:
632636
633637 if self ._cur_line .startswith (("error:" , "fatal:" )):
634638 self .error_lines .append (self ._cur_line )
635- return
639+ return None
636640
637641 cur_count , max_count = None , None
638642 match = self .re_op_relative .match (line_str )
@@ -642,7 +646,7 @@ def _parse_progress_line(self, line: AnyStr) -> None:
642646 if not match :
643647 self .line_dropped (line_str )
644648 self .other_lines .append (line_str )
645- return
649+ return None
646650 # END could not get match
647651
648652 op_code = 0
@@ -673,7 +677,7 @@ def _parse_progress_line(self, line: AnyStr) -> None:
673677 self .line_dropped (line_str )
674678 # Note: Don't add this line to the other lines, as we have to silently
675679 # drop it.
676- return
680+ return None
677681 # END handle op code
678682
679683 # Figure out stage.
@@ -699,6 +703,7 @@ def _parse_progress_line(self, line: AnyStr) -> None:
699703 max_count and float (max_count ),
700704 message ,
701705 )
706+ return None
702707
703708 def new_message_handler (self ) -> Callable [[str ], None ]:
704709 """
@@ -708,7 +713,7 @@ def new_message_handler(self) -> Callable[[str], None]:
708713 """
709714
710715 def handler (line : AnyStr ) -> None :
711- return self ._parse_progress_line (line .rstrip ())
716+ self ._parse_progress_line (line .rstrip ())
712717
713718 # END handler
714719
0 commit comments