Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class TypedloadTypeError(TypedloadException, TypeError):
"""
Exception class, subclass of TypeError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class TypedloadAttributeError(TypedloadException, AttributeError):
"""
Exception class, subclass of AttributeError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
e += 'Type: %s ' % i.type_
if i.annotation:
e += 'Annotation: (%s %s) ' % (i.annotation[0], i.annotation[1])
path.append(str(i.annotation[1]) if type(i.annotation[1]) != int else '[%d]' % i.annotation[1])
else:
path.append(str(None))
e += 'Value: %s\n' % compress_value(i.value)
if path:
if path[0] == str(None):
path[0] = ''
e += 'Path: ' + '.'.join(path) + '\n'
return e
class TypedloadValueError(TypedloadException, ValueError):
"""
Exception class, subclass of ValueError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class TypedloadTypeError(TypedloadException, TypeError):
"""
Exception class, subclass of TypeError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
path[0] = ''
e += 'Path: ' + '.'.join(path) + '\n'
return e
class TypedloadValueError(TypedloadException, ValueError):
"""
Exception class, subclass of ValueError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class TypedloadTypeError(TypedloadException, TypeError):
"""
Exception class, subclass of TypeError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class TypedloadAttributeError(TypedloadException, AttributeError):
"""
Exception class, subclass of AttributeError.
See the documentation of TypedloadException for more details.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)