Skip to content

Commit 82b5fcc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 9cd6ffe commit 82b5fcc

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

stubs/openpyxl/openpyxl/cell/_writer.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from _typeshed import Incomplete, Unused
33
from openpyxl.cell import _CellOrMergedCell
44

55
def etree_write_cell(xf, worksheet: Unused, cell: _CellOrMergedCell, styled: Incomplete | None = None) -> None: ...
6-
def lxml_write_cell(xf, worksheet: Unused, cell:_CellOrMergedCell, styled: bool = False) -> None: ...
6+
def lxml_write_cell(xf, worksheet: Unused, cell: _CellOrMergedCell, styled: bool = False) -> None: ...
77

88
write_cell = lxml_write_cell
99
write_cell = etree_write_cell

stubs/openpyxl/openpyxl/worksheet/worksheet.pyi

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Worksheet(_WorkbookChild):
5151
ORIENTATION_PORTRAIT: Final = "portrait"
5252
ORIENTATION_LANDSCAPE: Final = "landscape"
5353

54-
_cells: dict[tuple[int, int], _CellOrMergedCell] # private but very useful to understand typing
54+
_cells: dict[tuple[int, int], _CellOrMergedCell] # private but very useful to understand typing
5555
row_dimensions: DimensionHolder[int, RowDimension]
5656
column_dimensions: DimensionHolder[str, ColumnDimension]
5757
row_breaks: RowBreak
@@ -96,7 +96,11 @@ class Worksheet(_WorkbookChild):
9696
def __getitem__(self, key: slice) -> tuple[Any, ...]: ... # tuple[AnyOf[_CellOrMergedCell, tuple[_CellOrMergedCell, ...]]]
9797
# A str could be an individual cell, row, column or full range
9898
@overload
99-
def __getitem__(self, key: str) -> Any: ... # AnyOf[_CellOrMergedCell, tuple[_CellOrMergedCell, ...], tuple[tuple[_CellOrMergedCell, ...], ...]] # noqa: E501
99+
def __getitem__(
100+
self, key: str
101+
) -> (
102+
Any
103+
): ... # AnyOf[_CellOrMergedCell, tuple[_CellOrMergedCell, ...], tuple[tuple[_CellOrMergedCell, ...], ...]] # noqa: E501
100104
def __setitem__(self, key: str, value: _CellValue) -> None: ...
101105
def __iter__(self) -> Iterator[tuple[_CellOrMergedCell, ...]]: ...
102106
def __delitem__(self, key: str) -> None: ...
@@ -137,7 +141,9 @@ class Worksheet(_WorkbookChild):
137141
@overload
138142
def iter_rows(
139143
self, min_row: int | None, max_row: int | None, min_col: int | None, max_col: int | None, values_only: bool
140-
) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]: ...
144+
) -> (
145+
Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]
146+
): ...
141147
@overload
142148
def iter_rows(
143149
self,
@@ -147,7 +153,9 @@ class Worksheet(_WorkbookChild):
147153
max_col: int | None = None,
148154
*,
149155
values_only: bool,
150-
) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]: ...
156+
) -> (
157+
Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]
158+
): ...
151159
@property
152160
def rows(self) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ...
153161
@property
@@ -178,7 +186,9 @@ class Worksheet(_WorkbookChild):
178186
@overload
179187
def iter_cols(
180188
self, min_col: int | None, max_col: int | None, min_row: int | None, max_row: int | None, values_only: bool
181-
) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]: ...
189+
) -> (
190+
Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]
191+
): ...
182192
@overload
183193
def iter_cols(
184194
self,
@@ -188,7 +198,9 @@ class Worksheet(_WorkbookChild):
188198
max_row: int | None = None,
189199
*,
190200
values_only: bool,
191-
) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]: ...
201+
) -> (
202+
Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[str | float | datetime | None, ...], None, None]
203+
): ...
192204
@property
193205
def columns(self) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ...
194206
@property
@@ -242,7 +254,7 @@ class Worksheet(_WorkbookChild):
242254
def append(
243255
self,
244256
iterable: (
245-
list[Any] # lists are invariant, but any subtype or union will do
257+
list[Any] # lists are invariant, but any subtype or union will do
246258
| tuple[_CellOrMergedCell | str | float | datetime | None, ...]
247259
| range
248260
| GeneratorType[_CellOrMergedCell | str | float | datetime | None, object, object]

0 commit comments

Comments
 (0)