Skip to content

Commit b8af317

Browse files
committed
CLN: Clean up PEP8 issues
1 parent 618aa4c commit b8af317

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

asv_bench/benchmarks/io/excel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def time_write_excel(self, engine):
4646
self.df.to_excel(writer, sheet_name="Sheet1")
4747
writer.save()
4848

49+
4950
class WriteExcelStyled:
5051
params = ["openpyxl", "xlsxwriter"]
5152
param_names = ["engine"]

pandas/io/formats/css.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,18 @@ class CSSResolver:
189189
SIDES = ("top", "right", "bottom", "left")
190190

191191
CSS_EXPANSIONS = {
192-
**{"-".join(filter(None, ["border", prop])): _border_expander(prop) for prop in ["", "top", "right", "bottom", "left"]},
193-
**{"-".join(["border", prop]): _side_expander("border-{:s}-"+prop) for prop in ["color", "style", "width"]},
194-
**{"margin": _side_expander("margin-{:s}"), "padding": _side_expander("padding-{:s}")}
192+
**{
193+
"-".join(filter(None, ["border", prop])): _border_expander(prop)
194+
for prop in ["", "top", "right", "bottom", "left"]
195+
},
196+
**{
197+
"-".join(["border", prop]): _side_expander("border-{:s}-" + prop)
198+
for prop in ["color", "style", "width"]
199+
},
200+
**{
201+
"margin": _side_expander("margin-{:s}"),
202+
"padding": _side_expander("padding-{:s}")
203+
}
195204
}
196205

197206
def __call__(

pandas/io/formats/excel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ def __init__(self, inherited: str | None = None) -> None:
168168
compute_css = CSSResolver()
169169

170170
@lru_cache
171-
def __call__(self, declarations: str | set[tuple[str, str]]) -> dict[str, dict[str, str]]:
171+
def __call__(
172+
self, declarations: str | set[tuple[str, str]]
173+
) -> dict[str, dict[str, str]]:
172174
"""
173175
Convert CSS declarations to ExcelWriter style.
174176

0 commit comments

Comments
 (0)