<commit_before># Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

'''Code to help make typed objects out of parsed YAML'''

from typing import Callable, Dict, List, Optional, Sequence, TypeVar

import yaml
try:
    from yaml import CSafeLoader as YamlLoader
except ImportError:
    from yaml import SafeLoader as YamlLoader


T = TypeVar('T')


def check_keys(obj: object,<commit_msg>[otbn] Silence mypy error in yaml_parse_helpers.py<commit_after># Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

'''Code to help make typed objects out of parsed YAML'''

from typing import Callable, Dict, List, Optional, Sequence, TypeVar

import yaml
try:
    from yaml import CSafeLoader as YamlLoader
except ImportError:
    from yaml import SafeLoader as YamlLoader  # type: ignore


T = TypeVar('T')


def check_keys(obj: object,
{'fraction_non_alphanumeric': 0.07783251231527094, 'fraction_numerical': 0.007881773399014778, 'mean_word_length': 4.805714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7049200', 'n_tokens_mistral': 313, 'n_tokens_neox': 293, 'n_words': 122}