(
    policy_break: PolicyBreak, all_policies: bool, matches_ignore: Iterable[Any]
)
return False
is_ignored checks if a occurrence is ignored.
    There are 2 ways of ignoring a occurrence:
    - matching the occurrence sha
    - matching one of the match.match values

    :param policy_break: Policy Break occurrence to judge
    :param matches_ignore: Iterable of match ignores
    (plaintext secrets of SHAs or this type{"name": some_name, "match": sha})
    :return: True if ignored
is_ignored checks if a occurrence is ignored.
    There are 2 ways of ignoring a occurrence:
    - matching the occurrence sha
    - matching one of the match.match values
is_ignored checks if a occurrence is ignored . There are 2 ways of ignoring a occurrence : - matching the occurrence sha - matching one of the match . match values
def is_ignored(
    policy_break: PolicyBreak, all_policies: bool, matches_ignore: Iterable[Any]
) -> bool:
    """
    is_ignored checks if a occurrence is ignored.
    There are 2 ways of ignoring a occurrence:
    - matching the occurrence sha
    - matching one of the match.match values

    :param policy_break: Policy Break occurrence to judge
    :param matches_ignore: Iterable of match ignores
    (plaintext secrets of SHAs or this type{"name": some_name, "match": sha})
    :return: True if ignored
    """

    matches_ignore = [
        match["match"] if isinstance(match, dict) else match for match in matches_ignore
    ]
    if not all_policies and policy_break.policy.lower() != "secrets detection":
        return True
    if get_ignore_sha(policy_break) in matches_ignore or any(
        match.match in matches_ignore for match in policy_break.matches
    ):
        return True
    return False
def is_ignored ( policy_break : PolicyBreak , all_policies : bool , matches_ignore : Iterable [ Any ] ) -> bool : matches_ignore = [ match [ "match" ] if isinstance ( match , dict ) else match for match in matches_ignore ] if not all_policies and policy_break . policy . lower ( ) != "secrets detection" : return True if get_ignore_sha ( policy_break ) in matches_ignore or any ( match . match in matches_ignore for match in policy_break . matches ) : return True return False