Validate the display data. Parameters ---------- data : dict The formata data dictionary. metadata : dict Any metadata for the data.
(self, data, metadata=None)
| 41 | super().__init__(*args, **kwargs) |
| 42 | |
| 43 | def _validate_data(self, data, metadata=None): |
| 44 | """Validate the display data. |
| 45 | |
| 46 | Parameters |
| 47 | ---------- |
| 48 | data : dict |
| 49 | The formata data dictionary. |
| 50 | metadata : dict |
| 51 | Any metadata for the data. |
| 52 | """ |
| 53 | |
| 54 | if not isinstance(data, dict): |
| 55 | raise TypeError('data must be a dict, got: %r' % data) |
| 56 | if metadata is not None: |
| 57 | if not isinstance(metadata, dict): |
| 58 | raise TypeError('metadata must be a dict, got: %r' % data) |
| 59 | |
| 60 | # use * to indicate transient, update are keyword-only |
| 61 | def publish(self, data, metadata=None, source=None, *, transient=None, update=False, **kwargs) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected