(
    flat_matches_dict: Dict[int, List[Match]], lines: List, nb_lines: int
)
return lines_to_display
Retrieve the line indexes to display in the content with no secrets.
Retrieve the line indexes to display in the content with no secrets.
Retrieve the line indexes to display in the content with no secrets .
def get_lines_to_display(
    flat_matches_dict: Dict[int, List[Match]], lines: List, nb_lines: int
) -> Set[int]:
    """Retrieve the line indexes to display in the content with no secrets."""
    lines_to_display: Set[int] = set()

    for line in sorted(flat_matches_dict):
        for match in flat_matches_dict[line]:
            lines_to_display.update(
                range(max(match.line_start - nb_lines + 1, 0), match.line_start + 1)
            )
            if match.line_end + 1 <= len(lines):
                lines_to_display.update(
                    range(
                        match.line_end + 1, min(match.line_end + nb_lines, len(lines))
                    )
                )

    return lines_to_display
def get_lines_to_display ( flat_matches_dict : Dict [ int , List [ Match ] ] , lines : List , nb_lines : int ) -> Set [ int ] : lines_to_display : Set [ int ] = set ( ) for line in sorted ( flat_matches_dict ) : for match in flat_matches_dict [ line ] : lines_to_display . update ( range ( max ( match . line_start - nb_lines + 1 , 0 ) , match . line_start + 1 ) ) if match . line_end + 1 <= len ( lines ) : lines_to_display . update ( range ( match . line_end + 1 , min ( match . line_end + nb_lines , len ( lines ) ) ) ) return lines_to_display