Skip to content

Commit 25ad970

Browse files
committed
Black linter
1 parent 69d75fa commit 25ad970

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

pandas/io/formats/excel.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,7 @@ def build_border(
253253
color = self.color_to_excel(props.get(f"border-{side}-color"))
254254
if style and style != "none" and color is None:
255255
color = self.color_to_excel("black")
256-
border_dict[side] = {
257-
"style": style,
258-
"color": color
259-
}
256+
border_dict[side] = {"style": style, "color": color}
260257
return border_dict
261258

262259
def _border_style(self, style: str | None, width: str | None, color: str | None):
@@ -304,8 +301,13 @@ def _border_style(self, style: str | None, width: str | None, color: str | None)
304301
return "dashed"
305302
return "mediumDashed"
306303
elif style in (
307-
"hair", "mediumDashDot", "dashDotDot", "mediumDashDotDot",
308-
"dashDot", "slandDashDot", "mediumDashed"
304+
"hair",
305+
"mediumDashDot",
306+
"dashDotDot",
307+
"mediumDashDotDot",
308+
"dashDot",
309+
"slandDashDot",
310+
"mediumDashed",
309311
):
310312
# Excel-specific styles
311313
return style

pandas/tests/io/excel/test_style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_styler_to_excel_unstyled(engine):
119119
(
120120
"border-left-style: hair; border-left-color: black",
121121
["border", "left", "style"],
122-
"hair"
122+
"hair",
123123
),
124124
("border-left-style: hair;", ["border", "left", "style"], "hair"),
125125
# CSS should default to black if style provided w/o color

0 commit comments

Comments
 (0)