This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typing | |
def check_type(obj: typing.Any, type_to_check: typing.Any, _external=True) -> None: | |
""" | |
Check the type of any nested object, as definable using the typing module. | |
Currently supports List, Dict, Union, Optional options from the typing module. | |
Examples: | |
>>> from typing import List, Dict, Union, Type, Optional |