Skip to content

Commit 4310d8c

Browse files
committed
Fix pyright
1 parent 5deb29d commit 4310d8c

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/asyncapi_python/contrib/wire/amqp/producer.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,8 @@ async def send_batch(
120120
address_override if address_override is not None else self._routing_key
121121
)
122122

123-
# Validate we have a destination
124-
# Note: empty string is valid for default exchange with default queue
125-
if effective_routing_key is None:
126-
raise ValueError(
127-
f"Cannot send: no routing destination specified. "
128-
f"address_override={address_override}, routing_key={self._routing_key}"
129-
)
123+
# Note: empty string is valid for default exchange routing
124+
# All valid routing configurations should result in a non-None string at this point
130125

131126
for message in messages:
132127
amqp_message = AmqpMessage(

0 commit comments

Comments
 (0)