# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_cons.ipynb.

# %% auto 0
__all__ = ['U1', 'U2', 'DOT', 'NIL', 'TILDE', 'ALT', 'CLS', 'GET', 'RAW', 'ATTR', 'DUCK', 'LOAD', 'STRS', 'TYPE', 'TYPES',
           'DTYPE', 'VALUE', 'BASES', 'CHECK', 'GUARD', 'ASSET', 'AREPR', 'ATTRS', 'PREFIX', 'SUFFIX', 'RETURN',
           'DUCKED', 'LOADER', 'MODULE', 'RETHAS', 'RETSELF', 'DEFAULT', 'CLSNAME', 'DELAYED', 'DUCKSPEC', 'DROPNONE',
           'GETPROPS', 'CHECKOBJ', 'GUARDOBJ', 'IMPORTED', 'IS_MODULE', 'DECORATED', 'NAMESPACE', 'LOADER_STATE',
           'KEYS', 'VALUES', 'NDIM', 'SHAPE', 'ALL_ATTRS', 'DUCK_SPEC_ATTRS', 'DUCK_ATTRS', 'DUCKED_ATTRS',
           'DUCK_MODULE_ATTRS', 'IPYTHON_ATTRIBUTES', 'PROTOCOL_META_ATTRS', 'ANNOYING_ATTRS', 'MODULE_TYPE_ATTRS',
           'ASSIGNED', 'ATTRIBUTE_CLASS_VARS', 'PROTOCOL_METHOD_ORDER']

# %% ../nbs/00_cons.ipynb 6
#| export


# %% ../nbs/00_cons.ipynb 8
#| export


# %% ../nbs/00_cons.ipynb 10
#| export

# %% ../nbs/00_cons.ipynb 12
#| export

# %% ../nbs/00_cons.ipynb 14
#| export

# %% ../nbs/00_cons.ipynb 17
U1 = '_'
U2 = '__'

DOT = '.'
NIL = ''

TILDE = '~'

# %% ../nbs/00_cons.ipynb 19
ALT = 'alt'
CLS = 'cls'
GET = 'get'
RAW = 'raw'

ATTR = 'attr'
DUCK = 'duck' 
LOAD = 'load'
STRS = 'strs'
TYPE = 'type' 


TYPES = 'types'
DTYPE = 'dtype'
VALUE = 'value'

BASES = 'bases' 
CHECK = 'check'
GUARD = 'guard'

ASSET = 'asset'
AREPR = 'arepr'
ATTRS = 'attrs'

PREFIX = 'prefix'
SUFFIX = 'suffix'
 
 
RETURN = 'return'
DUCKED = 'ducked'
LOADER = 'loader'
MODULE = 'module'
RETHAS = 'rethas' 
RETSELF = 'retself'

DEFAULT = 'default'
CLSNAME = 'clsname' 
DELAYED = 'delayed'

DUCKSPEC = 'duckspec'
DROPNONE = 'dropnone'
GETPROPS = 'getprops'
CHECKOBJ = 'checkobj'
GUARDOBJ = 'guardobj'
IMPORTED = 'imported'

IS_MODULE = 'is_module'
DECORATED = 'decorated'
NAMESPACE = 'namespace'

LOADER_STATE = 'loader_state'

# %% ../nbs/00_cons.ipynb 20
KEYS = 'keys'
VALUES = 'values'
NDIM = 'ndim'
SHAPE = 'shape'

# %% ../nbs/00_cons.ipynb 22
_AREPR, _ASSET, _IMPORTED, _MODULE = f'{U1}{AREPR}', f'{U1}{ASSET}', f'{U1}{IMPORTED}', f'{U1}{MODULE}'
_DUCK = f'{U1}{DUCK}'
_DECORATED = f'{U1}{DECORATED}'

# %% ../nbs/00_cons.ipynb 24
_DEFAULT_ = '_default_'

# %% ../nbs/00_cons.ipynb 26
__K__ = '__k__'
__V__ = '__v__'
__N__ = '__n__'

__KVTYPES__ = '__kvtypes__'
__RETANNOT__ = '__retannot__'

# %% ../nbs/00_cons.ipynb 27
__DOC__ = '__doc__'
__NEW__ = '__new__'

__CALL__ = '__call__'
__INIT__ = '__init__'
__HASH__ = '__hash__'
__NAME__ = '__name__'
__SPEC__ = '__spec__'


__HUSH__ = '__hush__'
__LOAD__ = '__load__'
__DUCK__ = '__duck__'
__ALTS__ = '__alts__'

__BASES__ = '__bases__'
__PROPS__ = '__props__'
__ATTRS__ = '__attrs__'


__MODULE__ = '__module__'
__QUALNAME__ = '__qualname__'
__SIGNATURE__ = '__signature__'

__DUCKTYPE__ = '__ducktype__'
__EXPECTED__= '__expected__'
__REQUIRED__= '__required__'
__ALLEQUAL__= '__allequal__'
__EXTRAFNS__= '__extrafns__'
__USEALIAS__= '__usealias__'


__DUCKTYPES__ = '__ducktypes__'
__DUCKMODULE__ = '__duckmodule__'
__ANNOTATIONS__ = '__annotations__'

# %% ../nbs/00_cons.ipynb 29
ALL_ATTRS = {TYPE, DTYPE, TYPES}
'''Attributes of which all values in the iterable are to be checked against the type guards.''';

# %% ../nbs/00_cons.ipynb 31
DUCK_SPEC_ATTRS = (ASSET, IS_MODULE, DUCKED, DEFAULT, BASES, ATTRS, DELAYED)

# %% ../nbs/00_cons.ipynb 32
DUCK_ATTRS = (__DUCKTYPE__, __EXPECTED__, __REQUIRED__, __ALLEQUAL__, __EXTRAFNS__, __USEALIAS__)
'''Attributes that ABCDuck is expected to have''';

# %% ../nbs/00_cons.ipynb 33
DUCKED_ATTRS = (DUCK, _DUCK, __DUCK__, __DUCKTYPES__)
'''Attributes that an object _might_ have if the object maybe is a duck-type.''';

# %% ../nbs/00_cons.ipynb 34
DUCK_MODULE_ATTRS = (__DUCKMODULE__, __ALTS__, __HUSH__)

# %% ../nbs/00_cons.ipynb 36
IPYTHON_ATTRIBUTES = {
    '_ipython_canary_method_should_not_exist_', 
    '_ipython_display_',
    '_repr_mimebundle_',
    '_repr_html_',
    '_repr_markdown_',
    '_repr_svg_',
    '_repr_png_',
    '_repr_pdf_',
    '_repr_jpeg_',
    '_repr_latex_',
    '_repr_json_',
    '_repr_javascript_'
}
'''Attributes that `ipython` might invoke on an object when used in a notebook or console environment.''';

PROTOCOL_META_ATTRS = {'_is_protocol', '_is_runtime_protocol'}
'''Attributes that are invoked when `isinstance` is called on a ProtocolMeta subclass.''';

ANNOYING_ATTRS = IPYTHON_ATTRIBUTES | PROTOCOL_META_ATTRS
'''Attributes that are annoying to deal with when introspecting an object and should be ignored.''';

MODULE_TYPE_ATTRS = set({'__name__', '__doc__', '__loader__', '__spec__'})
'''Attributes that are required to represent a ModuleType''';

# %% ../nbs/00_cons.ipynb 37
ASSIGNED = (__MODULE__, __DOC__, __ANNOTATIONS__)

ATTRIBUTE_CLASS_VARS = (ATTR, CHECK, GUARD, CHECKOBJ, GUARDOBJ, RETSELF, DEFAULT)

# %% ../nbs/00_cons.ipynb 38
PROTOCOL_METHOD_ORDER = ('instcheck', 'decorator', 'generator', 'typeguard')
'''Options for the overloaded `ProtoType.__call__` method.''';
