(dictionary, key, typ)
| 108 | assert isinstance(value, typ), '%s: Unexpected type %r' % (path, type(value).__name__) |
| 109 | |
| 110 | def assert_dict_item(dictionary, key, typ): |
| 111 | # type: (Mapping[Any, Any], str, type) -> None |
| 112 | assert key in dictionary, '%s: Missing dictionary key %r' % (path, key) |
| 113 | value = dictionary[key] |
| 114 | assert isinstance(value, typ), '%s: Unexpected type %r for key %r' % ( |
| 115 | path, type(value).__name__, key) |
| 116 | |
| 117 | assert_type(data, list) |
| 118 | for item in data: |