Skip to content

Commit 5eb1cc2

Browse files
Fix some type annotations
1 parent b5851b3 commit 5eb1cc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/io/excel/_odswriter.py

+5-5
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, Tuple
3+
from typing import Any, DefaultDict, Dict, List, Optional, Tuple
44

55
import 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

Comments
 (0)