# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_type.ipynb.

# %% auto 0
__all__ = ['T', 'P', 'Types', 'TypeLike', 'Guard', 'TGuard', 'IterT', 'IterStr', 'IterFunc', 'NanGuard', 'IterGuard',
           'IterTGuard', 'AttrGuards']

# %% ../nbs/01_type.ipynb 6
from math import nan as pynan

# %% ../nbs/01_type.ipynb 8
from types import NoneType, FunctionType
from typing import (
    Self, Type, TypeVar, TypeGuard, TypeAlias, ParamSpec,
    Callable, Iterable, Optional, Protocol, _ProtocolMeta, 
    Any, Set, Dict, List, Tuple, Union, ClassVar, Generic, Literal,
    get_args, get_origin, runtime_checkable, overload, 
)

# %% ../nbs/01_type.ipynb 10
#| export


# %% ../nbs/01_type.ipynb 12
#| export


# %% ../nbs/01_type.ipynb 14
#| export


# %% ../nbs/01_type.ipynb 16
T = TypeVar('T')
P = ParamSpec('P')

Types: TypeAlias = Tuple[Type, ...]
'''`*args` type''';

TypeLike: TypeAlias = Union[type, Type, Type[T], TypeAlias]
'''type, Type, type of type, TypeAlias, or `*args` type''';

Guard: TypeAlias = TypeGuard[TypeLike]
'''Generic TypeGuard''';


TGuard: TypeAlias = TypeGuard[T]

IterT: TypeAlias = Iterable[T]
IterStr: TypeAlias = Iterable[str]
IterFunc: TypeAlias = Iterable[FunctionType]
NanGuard: TypeAlias = TypeGuard[pynan]
IterGuard: TypeAlias = TypeGuard[Iterable]
IterTGuard: TypeAlias = TypeGuard[Iterable[T]]
AttrGuards: TypeAlias = Dict[str, Callable[[T, Any], bool]]
