Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def publish(
data: bytes,
ordering_key: str = "",
**attrs: Mapping[str, str]
) -> "Future[str]":
) -> Future:
if isinstance(topic, str):
topic = TopicPath.parse(topic)
publisher = self._multiplexer.get_or_create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, underlying: AsyncSinglePublisher):

def publish(
self, data: bytes, ordering_key: str = "", **attrs: Mapping[str, str]
) -> "Future[str]":
) -> Future:
return self._managed_loop.submit(
self._underlying.publish(data=data, ordering_key=ordering_key, **attrs)
)
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsublite/cloudpubsub/publisher_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def publish(
data: bytes,
ordering_key: str = "",
**attrs: Mapping[str, str]
) -> "Future[str]":
) -> Future:
self._require_stared.require_started()
return self._impl.publish(
topic=topic, data=data, ordering_key=ordering_key, **attrs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def publish(
data: bytes,
ordering_key: str = "",
**attrs: Mapping[str, str],
) -> "Future[str]":
) -> Future:
"""
Publish a message.

Expand All @@ -78,7 +78,8 @@ def publish(
**attrs: Additional attributes to send.

Returns:
A future completed with an ack id, which can be decoded using MessageMetadata.decode.
A future completed with an ack id of type str, which can be decoded using
MessageMetadata.decode.

Raises:
GoogleApiCallError: On a permanent failure.
Expand Down