diff --git a/google/cloud/pubsublite/cloudpubsub/message_transforms.py b/google/cloud/pubsublite/cloudpubsub/message_transforms.py index 7f56711b..c3bbfddf 100644 --- a/google/cloud/pubsublite/cloudpubsub/message_transforms.py +++ b/google/cloud/pubsublite/cloudpubsub/message_transforms.py @@ -58,14 +58,14 @@ def decode_attribute_event_time(attr: str) -> datetime.datetime: def _parse_attributes(values: AttributeValues) -> str: if not len(values.values) == 1: raise InvalidArgument( - "Received an unparseable message with multiple values for an attribute." + "Received an unparsable message with multiple values for an attribute." ) value: bytes = values.values[0] try: return value.decode("utf-8") except UnicodeError: raise InvalidArgument( - "Received an unparseable message with a non-utf8 attribute." + "Received an unparsable message with a non-utf8 attribute." ) @@ -104,7 +104,7 @@ def _to_cps_publish_message_proto( try: out.ordering_key = source.key.decode("utf-8") except UnicodeError: - raise InvalidArgument("Received an unparseable message with a non-utf8 key.") + raise InvalidArgument("Received an unparsable message with a non-utf8 key.") if PUBSUB_LITE_EVENT_TIME in source.attributes: raise InvalidArgument( "Special timestamp attribute exists in wire message. Unable to parse message." diff --git a/google/cloud/pubsublite_v1/services/cursor_service/async_client.py b/google/cloud/pubsublite_v1/services/cursor_service/async_client.py index c1fa88e7..33efd99b 100644 --- a/google/cloud/pubsublite_v1/services/cursor_service/async_client.py +++ b/google/cloud/pubsublite_v1/services/cursor_service/async_client.py @@ -56,7 +56,7 @@ class CursorServiceAsyncClient: """The service that a subscriber client application uses to - manage committed cursors while receiving messsages. A cursor + manage committed cursors while receiving messages. A cursor represents a subscriber's progress within a topic partition for a given subscription. """ diff --git a/google/cloud/pubsublite_v1/services/cursor_service/client.py b/google/cloud/pubsublite_v1/services/cursor_service/client.py index b70644c2..14caa9d7 100644 --- a/google/cloud/pubsublite_v1/services/cursor_service/client.py +++ b/google/cloud/pubsublite_v1/services/cursor_service/client.py @@ -94,7 +94,7 @@ def get_transport_class( class CursorServiceClient(metaclass=CursorServiceClientMeta): """The service that a subscriber client application uses to - manage committed cursors while receiving messsages. A cursor + manage committed cursors while receiving messages. A cursor represents a subscriber's progress within a topic partition for a given subscription. """ diff --git a/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc.py b/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc.py index f02f5d32..f64703c0 100644 --- a/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc.py +++ b/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc.py @@ -33,7 +33,7 @@ class CursorServiceGrpcTransport(CursorServiceTransport): """gRPC backend transport for CursorService. The service that a subscriber client application uses to - manage committed cursors while receiving messsages. A cursor + manage committed cursors while receiving messages. A cursor represents a subscriber's progress within a topic partition for a given subscription. diff --git a/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc_asyncio.py b/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc_asyncio.py index 41d9f0aa..4c60a5cd 100644 --- a/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc_asyncio.py +++ b/google/cloud/pubsublite_v1/services/cursor_service/transports/grpc_asyncio.py @@ -36,7 +36,7 @@ class CursorServiceGrpcAsyncIOTransport(CursorServiceTransport): """gRPC AsyncIO backend transport for CursorService. The service that a subscriber client application uses to - manage committed cursors while receiving messsages. A cursor + manage committed cursors while receiving messages. A cursor represents a subscriber's progress within a topic partition for a given subscription. diff --git a/samples/snippets/noxfile_config.py b/samples/snippets/noxfile_config.py index 54fb6262..f4fd67c2 100644 --- a/samples/snippets/noxfile_config.py +++ b/samples/snippets/noxfile_config.py @@ -14,7 +14,7 @@ # Default TEST_CONFIG_OVERRIDE for python repos. -# You can copy this file into your directory, then it will be inported from +# You can copy this file into your directory, then it will be imported from # the noxfile.py. # The source of truth: diff --git a/samples/snippets/publish_with_batch_settings_example.py b/samples/snippets/publish_with_batch_settings_example.py index ee3d2772..6d7db9b7 100644 --- a/samples/snippets/publish_with_batch_settings_example.py +++ b/samples/snippets/publish_with_batch_settings_example.py @@ -49,7 +49,7 @@ def publish_with_batch_settings( location = CloudZone(CloudRegion(cloud_region), zone_id) topic_path = TopicPath(project_number, location, topic_id) - batch_setttings = BatchSettings( + batch_settings = BatchSettings( # 2 MiB. Default to 3 MiB. Must be less than 4 MiB gRPC's per-message limit. max_bytes=2 * 1024 * 1024, # 100 ms. Default to 50 ms. @@ -60,7 +60,7 @@ def publish_with_batch_settings( # PublisherClient() must be used in a `with` block or have __enter__() called before use. with PublisherClient( - per_partition_batching_settings=batch_setttings + per_partition_batching_settings=batch_settings ) as publisher_client: for message in range(num_messages): data = f"{message}" diff --git a/samples/snippets/publish_with_ordering_key_example.py b/samples/snippets/publish_with_ordering_key_example.py index 2c4fbe75..1ca461a0 100644 --- a/samples/snippets/publish_with_ordering_key_example.py +++ b/samples/snippets/publish_with_ordering_key_example.py @@ -54,7 +54,7 @@ def publish_with_odering_key( for message in range(num_messages): data = f"{message}" # Messages of the same ordering key will always get published to the same partition. - # When ordering_key is unset, messsages can get published ot different partitions if + # When ordering_key is unset, messages can get published to different partitions if # more than one partition exists for the topic. api_future = publisher_client.publish( topic_path, data.encode("utf-8"), ordering_key="testing" diff --git a/samples/snippets/update_lite_topic_example.py b/samples/snippets/update_lite_topic_example.py index 89406ac4..942f3597 100644 --- a/samples/snippets/update_lite_topic_example.py +++ b/samples/snippets/update_lite_topic_example.py @@ -62,7 +62,7 @@ def update_lite_topic( "partition_config.capacity", "retention_config.per_partition_bytes", "retention_config.period", - "reservation_confing.throughput_reservation", + "reservation_config.throughput_reservation", ] ) @@ -80,7 +80,7 @@ def update_lite_topic( # If the number of byptes stored in any of the topic's partitions grows beyond # this value, older messages will be dropped to make room for newer ones, # regardless of the value of `period`. - # Be careful when decreasing storage per partition as it may cuase lost messages. + # Be careful when decreasing storage per partition as it may cause lost messages. per_partition_bytes=32 * 1024 * 1024 * 1024, # Allow messages to be stored for 14 days. period=Duration(seconds=60 * 60 * 24 * 14),