Commit 2ffaf6f
authored
fix: type for serialized TableChunks (#4056)
#### To test, simply serialize a TableChunk element with and without the
changes in the PR
____
**Without the changes:**
```
In [1]: from unstructured.documents.elements import TableChunk
In [2]: TableChunk("hi")
Out[2]: <unstructured.documents.elements.TableChunk at 0x110113410>
In [3]: TableChunk("hi").to_dict()
Out[3]:
{'type': 'Table',
'element_id': '6267e99a-46d8-4f2d-a206-51c691469c72',
'text': 'hi',
'metadata': {}}
```
____
**With the changes:**
```
In [1]: from unstructured.documents.elements import TableChunk
In [2]: TableChunk("hi")
Out[2]: <unstructured.documents.elements.TableChunk at 0x10367f050>
In [3]: TableChunk("hi").to_dict()
Out[3]:
{'type': 'TableChunk',
'element_id': 'f91af3ac-0dea-4dc4-8a6a-69c28cfcca3b',
'text': 'hi',
'metadata': {}}
```
____1 parent 37800c3 commit 2ffaf6f
3 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
946 | | - | |
| 946 | + | |
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| |||
0 commit comments