Skip to content

Commit 2a7905e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5f06729 commit 2a7905e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/io/formats/style/test_bar.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import numpy as np
22
import pytest
33

4-
from pandas import DataFrame, NA
4+
from pandas import (
5+
NA,
6+
DataFrame,
7+
)
58

69
pytest.importorskip("jinja2")
710

@@ -312,7 +315,7 @@ def test_bar_color_and_cmap_error_raises():
312315
msg = "`color` and `cmap` cannot both be given"
313316
# Test that providing both color and cmap raises a ValueError
314317
with pytest.raises(ValueError, match=msg):
315-
df.style.bar(color='#d65f5f', cmap='viridis').to_html()
318+
df.style.bar(color="#d65f5f", cmap="viridis").to_html()
316319

317320

318321
def test_bar_invalid_color_type_error_raises():
@@ -327,14 +330,14 @@ def test_bar_invalid_color_type_error_raises():
327330

328331
# Test that providing a color list with more than two elements raises a ValueError
329332
with pytest.raises(ValueError, match=msg):
330-
df.style.bar(color=['#d65f5f', '#5fba7d', '#abcdef']).to_html()
333+
df.style.bar(color=["#d65f5f", "#5fba7d", "#abcdef"]).to_html()
331334

332335

333336
def test_styler_bar_with_NA_values():
334337
df1 = DataFrame({"A": [1, 2, NA, 4]})
335338
df2 = DataFrame([[NA, NA], [NA, NA]])
336339
expected_substring = "style type="
337-
html_output1 = df1.style.bar(subset='A').to_html()
340+
html_output1 = df1.style.bar(subset="A").to_html()
338341
html_output2 = df2.style.bar(align="left", axis=None).to_html()
339342
assert expected_substring in html_output1
340343
assert expected_substring in html_output2

0 commit comments

Comments
 (0)