11from collections import defaultdict
22import datetime
3- from typing import Any , DefaultDict , Dict , List , Tuple
3+ from typing import Any , DefaultDict , Dict , List , Optional , Tuple
44
55import pandas ._libs .json as json
66
@@ -13,7 +13,7 @@ class _ODSWriter(ExcelWriter):
1313 supported_extensions = (".ods" ,)
1414
1515 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
1717 ):
1818 from odf .opendocument import OpenDocumentSpreadsheet
1919
@@ -38,10 +38,10 @@ def save(self) -> None:
3838 def write_cells (
3939 self ,
4040 cells ,
41- sheet_name : str = None ,
41+ sheet_name : Optional [ str ] = None ,
4242 startrow : int = 0 ,
4343 startcol : int = 0 ,
44- freeze_panes : List = None ,
44+ freeze_panes : Optional [ List ] = None ,
4545 ) -> None :
4646 """
4747 Write the frame cells using odf
@@ -100,7 +100,7 @@ def _make_table_cell_attributes(self, cell) -> Dict[str, object]:
100100 attributes : Dict[str, object]
101101 Dictionary with attributes and attribute values
102102 """
103- attributes = {}
103+ attributes : Dict [ str , object ] = {}
104104 style_name = self ._process_style (cell .style )
105105 if style_name is not None :
106106 attributes ["stylename" ] = style_name
0 commit comments