This file contains 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 ast | |
import inspect | |
import textwrap | |
from contextlib import suppress | |
from collections import defaultdict | |
from typing import Union, Dict, Callable, Type, Any, Tuple, List | |
def is_union(t) -> bool: |