Skip to content

Commit 82bcb89

Browse files
authored
chore: Fix linting in Anthropic (#2251)
* Fix linting * Remove unused import
1 parent c24c4db commit 82bcb89

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

integrations/anthropic/tests/test_chat_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ def test_convert_message_to_anthropic_format_with_image(self):
11711171
image_content = ImageContent(base64_image=base64_image, mime_type="image/png")
11721172
message = ChatMessage.from_user(content_parts=["What's in this image?", image_content])
11731173

1174-
system_messages, non_system_messages = _convert_messages_to_anthropic_format([message])
1174+
_, non_system_messages = _convert_messages_to_anthropic_format([message])
11751175

11761176
assert len(non_system_messages) == 1
11771177
anthropic_message = non_system_messages[0]

integrations/anthropic/tests/test_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_init_default(self, monkeypatch):
2020

2121
def test_init_fail_wo_api_key(self, monkeypatch):
2222
monkeypatch.delenv("ANTHROPIC_API_KEY", raising=False)
23-
with pytest.raises(ValueError, match="None of the .* environment variables are set"):
23+
with pytest.raises(ValueError, match=r"None of the .* environment variables are set"):
2424
AnthropicGenerator()
2525

2626
def test_init_with_parameters(self):
@@ -113,7 +113,7 @@ def test_from_dict_fail_wo_env_var(self, monkeypatch):
113113
"max_retries": None,
114114
},
115115
}
116-
with pytest.raises(ValueError, match="None of the .* environment variables are set"):
116+
with pytest.raises(ValueError, match=r"None of the .* environment variables are set"):
117117
AnthropicGenerator.from_dict(data)
118118

119119
def test_run(self, mock_chat_completion):

0 commit comments

Comments
 (0)