Closed konradhalas closed 4 years ago
Adding a testcase with a non-class type like Optional
should cover this.
Example catching the TypeError :) https://github.com/konradhalas/dacite/commit/a57b31b34c83759d80e15a964573569d8122e485
@antonagestam thank you very much for a review and testing. Good catch - I fixed Optional[...]
case. Should be ok now :)
@konradhalas I get
TypeError: issubclass() arg 1 must be a class
when testing this. Partial stack trace:I think this should either check with
inspect.isclass(...) and issubclass(...)
or catch the TypeError, see https://github.com/konradhalas/dacite/pull/65/files :)