fix(type-checking): fix py >= 3.9 dict type checking

This commit is contained in:
Gergő Jedlicska
2023-01-09 15:53:15 +01:00
parent 9c952b432d
commit 4628f111ba
+2
View File
@@ -235,6 +235,8 @@ def _validate_type(t: Optional[type], value: Any) -> Tuple[bool, Any]:
return False, value
if value == {}:
return True, value
if not getattr(t, "__args__", None):
return True, value
t_key, t_value = t.__args__ # type: ignore
if (