1
1
from collections import defaultdict
2
2
import datetime
3
- from typing import Any , DefaultDict , Dict , List , Tuple
3
+ from typing import Any , DefaultDict , Dict , List , Optional , Tuple
4
4
5
5
import pandas ._libs .json as json
6
6
@@ -13,7 +13,7 @@ class _ODSWriter(ExcelWriter):
13
13
supported_extensions = (".ods" ,)
14
14
15
15
def __init__ (
16
- self , path : str , engine : Dict = None , mode : str = "w" , ** engine_kwargs
16
+ self , path : str , engine : Optional [ str ] = None , mode : str = "w" , ** engine_kwargs
17
17
):
18
18
from odf .opendocument import OpenDocumentSpreadsheet
19
19
@@ -38,10 +38,10 @@ def save(self) -> None:
38
38
def write_cells (
39
39
self ,
40
40
cells ,
41
- sheet_name : str = None ,
41
+ sheet_name : Optional [ str ] = None ,
42
42
startrow : int = 0 ,
43
43
startcol : int = 0 ,
44
- freeze_panes : List = None ,
44
+ freeze_panes : Optional [ List ] = None ,
45
45
) -> None :
46
46
"""
47
47
Write the frame cells using odf
@@ -100,7 +100,7 @@ def _make_table_cell_attributes(self, cell) -> Dict[str, object]:
100
100
attributes : Dict[str, object]
101
101
Dictionary with attributes and attribute values
102
102
"""
103
- attributes = {}
103
+ attributes : Dict [ str , object ] = {}
104
104
style_name = self ._process_style (cell .style )
105
105
if style_name is not None :
106
106
attributes ["stylename" ] = style_name
0 commit comments