Skip to content

Objects with failing __repr__ cannot be validated #24

Description

@egormanga
>>> class C:
... 	def __repr__(self):
... 		raise Exception()

>>> typing_validate.is_valid(C(), C)
ZeroDivisionError: division by zero

This results in inability of using functions that validate self inside __init__ when not all attributes for __repr__ are present yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions