Fix typing for _dict_getter

This commit is contained in:
Luca Dorigo
2024-02-07 13:15:31 +01:00
committed by GitHub
parent 03c30f4aa9
commit e4a1bf2376
+1 -1
View File
@@ -105,7 +105,7 @@ def _coerce_state(schema: Type[Any], input: dict[str, Any]) -> dict[str, Any]:
return schema(**input)
def _dict_getter(allowed_keys: str, key: str, input: dict) -> Any:
def _dict_getter(allowed_keys: list[str], key: str, input: dict) -> Any:
if input is not None:
if not isinstance(input, dict) or any(key not in allowed_keys for key in input):
raise InvalidUpdateError(