1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2025-01-03 11:54:20 +00:00
cfig/cfig/customtyping.py
2022-04-20 04:15:10 +02:00

28 lines
608 B
Python

"""
This module extends :mod:`typing` with the types used by :mod:`cfig`.
"""
import typing as t
TYPE = t.TypeVar("TYPE")
ResolverAny = t.Callable[[t.Any], TYPE]
ResolverRequired = t.Callable[[str], TYPE]
ResolverOptional = t.Callable[[t.Optional[str]], TYPE]
ProxyAny = t.Callable[[t.Callable[[t.Any], TYPE]], TYPE]
ProxyRequired = t.Callable[[t.Callable[[str], TYPE]], TYPE]
ProxyOptional = t.Callable[[t.Callable[[t.Optional[str]], TYPE]], TYPE]
__all__ = (
"TYPE",
"ResolverAny",
"ResolverRequired",
"ResolverOptional",
"ProxyAny",
"ProxyRequired",
"ProxyOptional",
)