Skip to content

Commit

Permalink
fix: remove extra overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
doublehomixide committed Jan 8, 2025
1 parent bfb8421 commit aa14005
Showing 1 changed file with 1 addition and 111 deletions.
112 changes: 1 addition & 111 deletions faststream/rabbit/broker/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,116 +536,6 @@ async def start(self) -> None:
logger_state.log(f"Set max consumers to {self._max_consumers}")



@overload
async def publish(
self,
message: "AioPikaSendableMessage" = None,
queue: None = "",
exchange: Union["RabbitExchange", str, 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: 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,
message: "AioPikaSendableMessage" = None,
queue: Union["RabbitQueue", str] = "",
exchange: Union["RabbitExchange", str, 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,
) -> "aiormq.abc.ConfirmationFrameType":...

@override
async def publish(
self,
message: "AioPikaSendableMessage" = None,
Expand All @@ -670,7 +560,7 @@ async def publish(
message_type: Optional[str] = None,
user_id: Optional[str] = None,
priority: Optional[int] = None,
) -> Optional["aiormq.abc.ConfirmationFrameType"]:
) -> "aiormq.abc.ConfirmationFrameType":
"""Publish message directly.
This method allows you to publish message in not AsyncAPI-documented way. You can use it in another frameworks
Expand Down

0 comments on commit aa14005

Please sign in to comment.