Skip to content

Commit e0d8be0

Browse files
committed
refactor: rename TableOptions to TableProps and TableProps to TableData for clarity
1 parent 10e9a8d commit e0d8be0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/pptxr/_pptx/shape/table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TableCellStyle(TypedDict):
2424
font_name: NotRequired[str]
2525

2626

27-
class TableOptions(TypedDict):
27+
class TableProps(TypedDict):
2828
"""Table properties."""
2929

3030
left: Length | LiteralLength
@@ -35,7 +35,7 @@ class TableOptions(TypedDict):
3535
first_row_header: NotRequired[bool]
3636

3737

38-
class TableProps(TableOptions):
38+
class TableData(TableProps):
3939
"""Table data."""
4040

4141
type: Literal["table"]
@@ -49,7 +49,7 @@ class Table(Shape[GraphicFrame]):
4949
def __init__(
5050
self,
5151
pptx_obj: GraphicFrame,
52-
props: TableProps | None = None,
52+
props: TableData | None = None,
5353
/,
5454
) -> None:
5555
self._pptx = pptx_obj

src/pptxr/_pptx/slide.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .converter import PptxConvertible, to_pptx_length
1313
from .shape import Shape
1414
from .shape.picture import Picture, PictureData, PictureProps
15-
from .shape.table import DataFrame, Table, TableOptions, TableProps
15+
from .shape.table import DataFrame, Table, TableData, TableProps
1616
from .shape.text import Text, TextData, TextProps
1717
from .shape.title import Title
1818

@@ -101,9 +101,9 @@ def picture(
101101

102102
return self
103103

104-
def table(self, data: DataFrame, **kwargs: Unpack[TableOptions]) -> Self:
104+
def table(self, data: DataFrame, **kwargs: Unpack[TableProps]) -> Self:
105105
rows, cols = len(data), len(data[0])
106-
props: TableProps = {"type": "table", "data": data, **kwargs}
106+
props: TableData = {"type": "table", "data": data, **kwargs}
107107

108108
self._shape_registry.append(
109109
lambda slide: Table(

0 commit comments

Comments
 (0)