Skip to content

Commit 62c4963

Browse files
committed
Revert "Fix new lint errors showing up after change"
This reverts commit 567adc6. pylint ignore instead
1 parent 567adc6 commit 62c4963

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ def configure_valid_response(
6565
)
6666
)
6767

68-
def generate_content(self, *, model, contents):
68+
def generate_content(self, *args, **kwargs):
6969
return asyncio.run(
70-
self.client.aio.models.generate_content(
71-
model=model, contents=contents
72-
)
70+
self.client.aio.models.generate_content(*args, **kwargs) # pylint: disable=missing-kwoa
7371
)
7472

7573
def test_async_generate_content_not_broken_by_instrumentation(self):

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,18 @@ def configure_valid_response(
6767
)
6868
)
6969

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

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

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ def configure_valid_response(
6464
)
6565
)
6666

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

0 commit comments

Comments
 (0)