Skip to content

Commit 567adc6

Browse files
committed
Fix new lint errors showing up after change
1 parent b263ae7 commit 567adc6

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_async_nonstreaming.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ def configure_valid_response(
6565
)
6666
)
6767

68-
def generate_content(self, *args, **kwargs):
68+
def generate_content(self, *, model, contents):
6969
return asyncio.run(
70-
self.client.aio.models.generate_content(*args, **kwargs)
70+
self.client.aio.models.generate_content(
71+
model=model, contents=contents
72+
)
7173
)
7274

7375
def test_async_generate_content_not_broken_by_instrumentation(self):

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_async_streaming.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,20 @@ def configure_valid_response(
6767
)
6868
)
6969

70-
async def _generate_content_helper(self, *args, **kwargs):
70+
async def _generate_content_helper(self, *, model, contents):
7171
result = []
7272
async for (
7373
response
7474
) in await self.client.aio.models.generate_content_stream(
75-
*args, **kwargs
75+
model=model, contents=contents
7676
):
7777
result.append(response)
7878
return result
7979

80-
def generate_content(self, *args, **kwargs):
81-
return asyncio.run(self._generate_content_helper(*args, **kwargs))
80+
def generate_content(self, *, model, contents):
81+
return asyncio.run(
82+
self._generate_content_helper(model=model, contents=contents)
83+
)
8284

8385
def test_async_generate_content_not_broken_by_instrumentation(self):
8486
self.configure_valid_response(response_text="Yep, it works!")

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_sync_streaming.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ def configure_valid_response(
6464
)
6565
)
6666

67-
def generate_content(self, *args, **kwargs):
67+
def generate_content(self, *, model, contents):
6868
result = []
6969
for response in self.client.models.generate_content_stream(
70-
*args, **kwargs
70+
model=model, contents=contents
7171
):
7272
result.append(response)
7373
return result

0 commit comments

Comments
 (0)