Skip to content

Commit 45467d2

Browse files
Add more typing info
1 parent 97707b8 commit 45467d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/io/excel/_odswriter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections import defaultdict
22
import datetime
3-
from typing import Any, DefaultDict, Dict, List, Optional, Tuple
3+
from typing import Any, DefaultDict, Dict, List, Optional, Tuple, Union
44

55
import pandas._libs.json as json
66

@@ -89,7 +89,7 @@ def write_cells(
8989
for row_nr in range(max(rows.keys()) + 1):
9090
wks.addElement(rows[row_nr])
9191

92-
def _make_table_cell_attributes(self, cell) -> Dict[str, Any]:
92+
def _make_table_cell_attributes(self, cell) -> Dict[str, Union[int, str]]:
9393
"""Convert cell attributes to OpenDocument attributes
9494
9595
Parameters
@@ -99,10 +99,10 @@ def _make_table_cell_attributes(self, cell) -> Dict[str, Any]:
9999
100100
Returns
101101
-------
102-
attributes : Dict[str, object]
102+
attributes : Dict[str, Union[int, str]]
103103
Dictionary with attributes and attribute values
104104
"""
105-
attributes: Dict[str, object] = {}
105+
attributes: Dict[str, Union[int, str]] = {}
106106
style_name = self._process_style(cell.style)
107107
if style_name is not None:
108108
attributes["stylename"] = style_name

0 commit comments

Comments
 (0)