Open umonaca opened 2 years ago
Honestly, that should not return None
, it should raise an exception instead.
Honestly, that should not return
None
, it should raise an exception instead.
It's weird to me that this framework rarely raises any exceptions, but it silently consumes all types of exceptions and relies on side effects to log errors instead.
I agree, hence I think the typehint is actually the one thing that is right 😉
https://github.com/tuya/tuya-iot-python-sdk/blob/83f1e999d75ef87b2170ffbbb239ca8651dab0c3/tuya_iot/openapi.py#L230
It should be
dict[str, Any] | None
because there is a return None statement below.