Skip to content

Commit f6bd11a

Browse files
style(pre-commit): autofix
1 parent 6bdfb68 commit f6bd11a

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

tests/schema/tables/test_autolabel_metadata.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ class TestAutolabelModel:
77

88
def test_to_autolabel_model_type_error(self):
99
"""Test to_autolabel_model raises TypeError for invalid input."""
10-
with pytest.raises(TypeError, match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances."):
10+
with pytest.raises(
11+
TypeError,
12+
match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances.",
13+
):
1114
AutolabelModel.to_autolabel_model("invalid_input")
1215

1316
def test_to_autolabel_model_type_error_with_dict(self):
1417
"""Test to_autolabel_model raises TypeError when input is a dict instead of list."""
15-
with pytest.raises(TypeError, match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances."):
18+
with pytest.raises(
19+
TypeError,
20+
match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances.",
21+
):
1622
AutolabelModel.to_autolabel_model({"name": "model1", "score": 0.8})
1723

1824
def test_to_autolabel_model_type_error_with_number(self):
1925
"""Test to_autolabel_model raises TypeError when input is a number."""
20-
with pytest.raises(TypeError, match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances."):
26+
with pytest.raises(
27+
TypeError,
28+
match="Input must be None or a list of \\[dicts or AutolabelModel\\] instances.",
29+
):
2130
AutolabelModel.to_autolabel_model(123)
2231

2332

@@ -26,17 +35,23 @@ class TestAutolabelMixin:
2635

2736
def test_autolabel_mixin_error_automatic_true_no_metadata(self):
2837
"""Test AutolabelMixin raises TypeError when automatic_annotation=True but autolabel_metadata=None."""
29-
with pytest.raises(TypeError, match="autolabel_metadata must be provided when automatic_annotation is True"):
38+
with pytest.raises(
39+
TypeError, match="autolabel_metadata must be provided when automatic_annotation is True"
40+
):
3041
AutolabelMixin(automatic_annotation=True, autolabel_metadata=None)
3142

3243
def test_autolabel_mixin_error_automatic_false_with_metadata(self):
3344
"""Test AutolabelMixin raises TypeError when automatic_annotation=False but autolabel_metadata is provided."""
3445
models = [AutolabelModel(name="test_model", score=0.8)]
35-
with pytest.raises(TypeError, match="autolabel_metadata must be None when automatic_annotation is False"):
46+
with pytest.raises(
47+
TypeError, match="autolabel_metadata must be None when automatic_annotation is False"
48+
):
3649
AutolabelMixin(automatic_annotation=False, autolabel_metadata=models)
3750

3851
def test_autolabel_mixin_error_default_automatic_with_metadata(self):
3952
"""Test AutolabelMixin raises TypeError when default automatic_annotation=False but autolabel_metadata is provided."""
4053
models = [AutolabelModel(name="test_model", score=0.8)]
41-
with pytest.raises(TypeError, match="autolabel_metadata must be None when automatic_annotation is False"):
54+
with pytest.raises(
55+
TypeError, match="autolabel_metadata must be None when automatic_annotation is False"
56+
):
4257
AutolabelMixin(autolabel_metadata=models)

0 commit comments

Comments
 (0)