Skip to content

Commit

Permalink
lint: fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed May 11, 2024
1 parent 7aa6d44 commit df5b8b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions faststream/redis/opentelemetry/provider.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, cast

from opentelemetry.semconv.trace import SpanAttributes

Expand Down Expand Up @@ -28,7 +28,7 @@ def get_consume_attrs_from_message(
MESSAGING_DESTINATION_PUBLISH_NAME: msg.raw_message["channel"],
}

if msg.raw_message.get("type", "").startswith("b"):
if cast(str, msg.raw_message.get("type", "")).startswith("b"):
attrs[SpanAttributes.MESSAGING_BATCH_MESSAGE_COUNT] = len(msg.decoded_body)

return attrs
Expand Down

0 comments on commit df5b8b0

Please sign in to comment.