Skip to content

Commit 35de237

Browse files
committed
Fix pylint warnings
1 parent c6a7897 commit 35de237

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

instrumentation/opentelemetry-instrumentation-botocore/examples/bedrock-runtime/zero-code/converse_stream.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def main():
1616
)
1717

1818
response = ""
19-
for s in stream["stream"]:
20-
if "contentBlockDelta" in s:
21-
response += s["contentBlockDelta"]["delta"]["text"]
19+
for event in stream["stream"]:
20+
if "contentBlockDelta" in event:
21+
response += event["contentBlockDelta"]["delta"]["text"]
2222
print(response)
2323

2424

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ def stream_done_callback(response):
278278
result["stream"], stream_done_callback
279279
)
280280
return
281-
else:
282-
# Converse
283-
self._converse_on_success(span, result)
281+
282+
# Converse
283+
self._converse_on_success(span, result)
284284

285285
model_id = self._call_context.params.get(_MODEL_ID_KEY)
286286
if not model_id:

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from wrapt import ObjectProxy
2323

2424

25+
# pylint: disable=abstract-method
2526
class ConverseStreamWrapper(ObjectProxy):
2627
"""Wrapper for botocor.event.EventStream"""
2728

instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def test_converse_stream_with_content(
118118
bedrock_runtime_client,
119119
instrument_with_content,
120120
):
121+
# pylint:disable=too-many-locals
121122
messages = [{"role": "user", "content": [{"text": "Say this is a test"}]}]
122123

123124
llm_model_value = "amazon.titan-text-lite-v1"

0 commit comments

Comments
 (0)