Skip to content

Commit 9617e7d

Browse files
committed
Fix lint errors caused by addition of (Optional).
Mostly, lines that were too long.
1 parent 262c025 commit 9617e7d

4 files changed

Lines changed: 34 additions & 29 deletions

File tree

packages/google-cloud-pubsub/google/cloud/pubsub/_gax.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,14 @@ def subscription_create(self, subscription_path, topic_path,
270270
``projects/<PROJECT>/topics/<TOPIC_NAME>``.
271271
272272
:type ack_deadline: int
273-
:param ack_deadline: (Optional) the deadline (in seconds) by which messages pulled
274-
from the back-end must be acknowledged.
273+
:param ack_deadline:
274+
(Optional) the deadline (in seconds) by which messages pulled from
275+
the back-end must be acknowledged.
275276
276277
:type push_endpoint: str
277-
:param push_endpoint: (Optional) URL to which messages will be pushed by the
278-
back-end. If not set, the application must pull
279-
messages.
278+
:param push_endpoint:
279+
(Optional) URL to which messages will be pushed by the back-end.
280+
If not set, the application must pull messages.
280281
281282
:rtype: dict
282283
:returns: ``Subscription`` resource returned from the API.
@@ -352,9 +353,9 @@ def subscription_modify_push_config(self, subscription_path,
352353
``projects/<PROJECT>/subscriptions/<SUB_NAME>``.
353354
354355
:type push_endpoint: str
355-
:param push_endpoint: (Optional) URL to which messages will be pushed by the
356-
back-end. If not set, the application must pull
357-
messages.
356+
:param push_endpoint:
357+
(Optional) URL to which messages will be pushed by the back-end.
358+
If not set, the application must pull messages.
358359
"""
359360
push_config = PushConfig(push_endpoint=push_endpoint)
360361
try:

packages/google-cloud-pubsub/google/cloud/pubsub/connection.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,14 @@ def subscription_create(self, subscription_path, topic_path,
310310
``projects/<PROJECT>/topics/<TOPIC_NAME>``.
311311
312312
:type ack_deadline: int
313-
:param ack_deadline: (Optional) the deadline (in seconds) by which messages pulled
314-
from the back-end must be acknowledged.
313+
:param ack_deadline:
314+
(Optional) the deadline (in seconds) by which messages pulled from
315+
the back-end must be acknowledged.
315316
316317
:type push_endpoint: str
317-
:param push_endpoint: (Optional) URL to which messages will be pushed by the
318-
back-end. If not set, the application must pull
319-
messages.
318+
:param push_endpoint:
319+
(Optional) URL to which messages will be pushed by the back-end.
320+
If not set, the application must pull messages.
320321
321322
:rtype: dict
322323
:returns: ``Subscription`` resource returned from the API.
@@ -379,9 +380,9 @@ def subscription_modify_push_config(self, subscription_path,
379380
``projects/<PROJECT>/subscriptions/<SUB_NAME>``.
380381
381382
:type push_endpoint: str
382-
:param push_endpoint: (Optional) URL to which messages will be pushed by the
383-
back-end. If not set, the application must pull
384-
messages.
383+
:param push_endpoint:
384+
(Optional) URL to which messages will be pushed by the back-end.
385+
If not set, the application must pull messages.
385386
"""
386387
conn = self._connection
387388
path = '/%s:modifyPushConfig' % (subscription_path,)

packages/google-cloud-pubsub/google/cloud/pubsub/message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class Message(object):
3333
:param message_id: An ID assigned to the message by the API.
3434
3535
:type attributes: dict
36-
:param attributes: (Optional) Extra metadata associated by the publisher with the
37-
message.
36+
:param attributes:
37+
(Optional) Extra metadata associated by the publisher with the message.
3838
"""
3939
_service_timestamp = None
4040

packages/google-cloud-pubsub/google/cloud/pubsub/subscription.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,23 @@ class Subscription(object):
3030
:param name: the name of the subscription.
3131
3232
:type topic: :class:`google.cloud.pubsub.topic.Topic`
33-
:param topic: (Optional) the topic to which the subscription belongs; if ``None``,
34-
the subscription's topic has been deleted.
33+
:param topic:
34+
(Optional) the topic to which the subscription belongs; if ``None``,
35+
the subscription's topic has been deleted.
3536
3637
:type ack_deadline: int
3738
:param ack_deadline: the deadline (in seconds) by which messages pulled
3839
from the back-end must be acknowledged.
3940
4041
:type push_endpoint: str
41-
:param push_endpoint: URL to which messages will be pushed by the back-end.
42-
If not set, the application must pull messages.
43-
44-
:type client: :class:`~google.cloud.pubsub.client.Client` or
45-
``NoneType``
46-
:param client: the client to use. If not passed, falls back to the
47-
``client`` stored on the topic.
42+
:param push_endpoint:
43+
(Optional) URL to which messages will be pushed by the back-end. If
44+
not set, the application must pull messages.
45+
46+
:type client: :class:`~google.cloud.pubsub.client.Client`
47+
:param client:
48+
(Optional) The client to use. If not passed, falls back to the
49+
``client`` stored on the topic.
4850
"""
4951

5052
_DELETED_TOPIC_PATH = '_deleted-topic_'
@@ -82,8 +84,9 @@ def from_api_repr(cls, resource, client, topics=None):
8284
configuration for a topic.
8385
8486
:type topics: dict
85-
:param topics: (Optional) A mapping of topic names -> topics. If not passed,
86-
the subscription will have a newly-created topic.
87+
:param topics:
88+
(Optional) A mapping of topic names -> topics. If not passed, the
89+
subscription will have a newly-created topic.
8790
8891
:rtype: :class:`google.cloud.pubsub.subscription.Subscription`
8992
:returns: Subscription parsed from ``resource``.

0 commit comments

Comments
 (0)