Skip to content

Commit

Permalink
test: new overloads for publish func
Browse files Browse the repository at this point in the history
  • Loading branch information
doublehomixide committed Jan 5, 2025
1 parent 9d769d9 commit 4fed000
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions faststream/rabbit/broker/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,60 @@ async def publish(
priority: Optional[int] = None,
) -> None:...

@overload
async def publish(
self,
message: "AioPikaSendableMessage" = None,
queue: Union["RabbitQueue", str] = "",
exchange: None = None,
*,
routing_key: str = "",
# ↓ publish kwargs
mandatory: bool = True,
immediate: bool = False,
timeout: "TimeoutType" = None,
persist: bool = False,
reply_to: Optional[str] = None,
correlation_id: Optional[str] = None,
# ↓ kwargs for super().init(), super is PublishCommand
headers: Optional["HeadersType"] = None,
content_type: Optional[str] = None,
content_encoding: Optional[str] = None,
expiration: Optional["DateType"] = None,
message_id: Optional[str] = None,
timestamp: Optional["DateType"] = None,
message_type: Optional[str] = None,
user_id: Optional[str] = None,
priority: Optional[int] = None,
) -> None:...

@overload
async def publish(
self,
message: "AioPikaSendableMessage" = None,
queue: None = "",
exchange: None = None,
*,
routing_key: str = "",
# ↓ publish kwargs
mandatory: bool = True,
immediate: bool = False,
timeout: "TimeoutType" = None,
persist: bool = False,
reply_to: Optional[str] = None,
correlation_id: Optional[str] = None,
# ↓ kwargs for super().init(), super is PublishCommand
headers: Optional["HeadersType"] = None,
content_type: Optional[str] = None,
content_encoding: Optional[str] = None,
expiration: Optional["DateType"] = None,
message_id: Optional[str] = None,
timestamp: Optional["DateType"] = None,
message_type: Optional[str] = None,
user_id: Optional[str] = None,
priority: Optional[int] = None,
) -> None:...

@overload
async def publish(
self,
Expand Down

0 comments on commit 4fed000

Please sign in to comment.