(table: dict)
| 164 | |
| 165 | # Now, we update the table and add the document |
| 166 | def updater(table: dict): |
| 167 | if doc_id in table: |
| 168 | raise ValueError(f'Document with ID {str(doc_id)} ' |
| 169 | f'already exists') |
| 170 | |
| 171 | # By calling ``dict(document)`` we convert the data we got to a |
| 172 | # ``dict`` instance even if it was a different class that |
| 173 | # implemented the ``Mapping`` interface |
| 174 | table[doc_id] = dict(document) |
| 175 | |
| 176 | # See below for details on ``Table._update`` |
| 177 | self._update_table(updater) |
nothing calls this directly
no test coverage detected