Skip to content

Commit 42638e1

Browse files
committed
fixed ruff-format
1 parent ed59ee1 commit 42638e1

3 files changed

Lines changed: 6 additions & 16 deletions

File tree

agentops/instrumentation/common/attributes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class IndexedAttribute(Protocol):
9898
formatting of attribute keys based on the indices.
9999
"""
100100

101-
def format(self, *, i: int, j: Optional[int] = None) -> str: ...
101+
def format(self, *, i: int, j: Optional[int] = None) -> str:
102+
...
102103

103104

104105
IndexedAttributeMap = Dict[IndexedAttribute, str] # target_attribute_key: source_attribute

agentops/instrumentation/openai_agents/attributes/completion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ def get_raw_response_attributes(response: Dict[str, Any]) -> Dict[str, Any]:
115115
result[MessageAttributes.COMPLETION_TOOL_CALL_NAME.format(i=j, j=k)] = function.get(
116116
"name", ""
117117
)
118-
result[MessageAttributes.COMPLETION_TOOL_CALL_ARGUMENTS.format(i=j, j=k)] = (
119-
function.get("arguments", "")
120-
)
118+
result[
119+
MessageAttributes.COMPLETION_TOOL_CALL_ARGUMENTS.format(i=j, j=k)
120+
] = function.get("arguments", "")
121121

122122
return result
123123

tests/integration/test_auth_flow.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from unittest.mock import patch, MagicMock
33
from agentops.client import Client
4-
from agentops.exceptions import NoApiKeyException, InvalidApiKeyException, ApiServerException
4+
from agentops.exceptions import InvalidApiKeyException, ApiServerException
55

66

77
@pytest.mark.vcr()
@@ -40,14 +40,3 @@ def test_auth_flow_invalid_key():
4040
client.init(api_key="invalid-key")
4141

4242
assert "Invalid API key" in str(exc_info.value)
43-
44-
45-
@pytest.mark.vcr()
46-
def test_auth_flow_no_key():
47-
"""Test authentication flow with no API key."""
48-
client = Client()
49-
50-
with pytest.raises(NoApiKeyException) as exc_info:
51-
client.init(api_key=None)
52-
53-
assert "API Key is missing" in str(exc_info.value)

0 commit comments

Comments
 (0)