Skip to content

Commit 75990c8

Browse files
committed
Fix lint errors caused by addition of (Optional).
Mostly, lines that were too long.
1 parent 2204a50 commit 75990c8

3 files changed

Lines changed: 45 additions & 30 deletions

File tree

packages/google-cloud-dns/google/cloud/dns/changes.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ def _require_client(self, client):
170170
"""Check client or verify over-ride.
171171
172172
:type client: :class:`google.cloud.dns.client.Client`
173-
:param client: (Optional) the client to use. If not passed, falls back to the
174-
``client`` stored on the current zone.
173+
:param client:
174+
(Optional) the client to use. If not passed, falls back to the
175+
``client`` stored on the current zone.
175176
176177
:rtype: :class:`google.cloud.dns.client.Client`
177178
:returns: The client passed in or the currently bound client.
@@ -208,8 +209,9 @@ def create(self, client=None):
208209
https://cloud.google.com/dns/api/v1/changes/create
209210
210211
:type client: :class:`google.cloud.dns.client.Client`
211-
:param client: (Optional) the client to use. If not passed, falls back to the
212-
``client`` stored on the current zone.
212+
:param client:
213+
(Optional) the client to use. If not passed, falls back to the
214+
``client`` stored on the current zone.
213215
"""
214216
if len(self.additions) == 0 and len(self.deletions) == 0:
215217
raise ValueError("No record sets added or deleted")
@@ -227,8 +229,9 @@ def exists(self, client=None):
227229
https://cloud.google.com/dns/api/v1/changes/get
228230
229231
:type client: :class:`google.cloud.dns.client.Client`
230-
:param client: (Optional) the client to use. If not passed, falls back to the
231-
``client`` stored on the current zone.
232+
:param client:
233+
(Optional) the client to use. If not passed, falls back to the
234+
``client`` stored on the current zone.
232235
233236
:rtype: bool
234237
:returns: Boolean indicating existence of the changes.
@@ -249,8 +252,9 @@ def reload(self, client=None):
249252
https://cloud.google.com/dns/api/v1/changes/get
250253
251254
:type client: :class:`google.cloud.dns.client.Client`
252-
:param client: (Optional) the client to use. If not passed, falls back to the
253-
``client`` stored on the current zone.
255+
:param client:
256+
(Optional) the client to use. If not passed, falls back to the
257+
``client`` stored on the current zone.
254258
"""
255259
client = self._require_client(client)
256260

packages/google-cloud-dns/google/cloud/dns/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ def zone(self, name, dns_name=None, description=None):
9292
:param name: Name of the zone.
9393
9494
:type dns_name: str
95-
:param dns_name: (Optional) DNS name of the zone. If not passed, then calls
96-
to :meth:`zone.create` will fail.
95+
:param dns_name:
96+
(Optional) DNS name of the zone. If not passed, then calls to
97+
:meth:`zone.create` will fail.
9798
9899
:type description: str
99-
:param description: (Optional) the description for the zone. If not passed,
100-
defaults to the value of 'dns_name'.
100+
:param description:
101+
(Optional) the description for the zone. If not passed, defaults
102+
to the value of 'dns_name'.
101103
102104
:rtype: :class:`google.cloud.dns.zone.ManagedZone`
103105
:returns: a new ``ManagedZone`` instance.

packages/google-cloud-dns/google/cloud/dns/zone.py

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,18 @@ class ManagedZone(object):
3333
:param name: the name of the zone
3434
3535
:type dns_name: str
36-
:param dns_name: (Optional) the DNS name of the zone. If not passed, then calls
37-
to :meth:`create` will fail.
36+
:param dns_name:
37+
(Optional) the DNS name of the zone. If not passed, then calls to
38+
:meth:`create` will fail.
3839
3940
:type client: :class:`google.cloud.dns.client.Client`
4041
:param client: A client which holds credentials and project configuration
4142
for the zone (which requires a project).
4243
4344
:type description: str
44-
:param description: (Optional) the description for the zone. If not passed, defaults
45-
to the value of 'dns_name'.
45+
:param description:
46+
(Optional) the description for the zone. If not passed, defaults to
47+
the value of 'dns_name'.
4648
"""
4749

4850
def __init__(self, name, dns_name=None, client=None, description=None):
@@ -203,8 +205,9 @@ def _require_client(self, client):
203205
"""Check client or verify over-ride.
204206
205207
:type client: :class:`google.cloud.dns.client.Client`
206-
:param client: (Optional) the client to use. If not passed, falls back to the
207-
``client`` stored on the current zone.
208+
:param client:
209+
(Optional) the client to use. If not passed, falls back to the
210+
``client`` stored on the current zone.
208211
209212
:rtype: :class:`google.cloud.dns.client.Client`
210213
:returns: The client passed in or the currently bound client.
@@ -251,8 +254,9 @@ def create(self, client=None):
251254
https://cloud.google.com/dns/api/v1/managedZones/create
252255
253256
:type client: :class:`google.cloud.dns.client.Client`
254-
:param client: (Optional) the client to use. If not passed, falls back to the
255-
``client`` stored on the current zone.
257+
:param client:
258+
(Optional) the client to use. If not passed, falls back to the
259+
``client`` stored on the current zone.
256260
"""
257261
client = self._require_client(client)
258262
path = '/projects/%s/managedZones' % (self.project,)
@@ -267,8 +271,9 @@ def exists(self, client=None):
267271
https://cloud.google.com/dns/api/v1/managedZones/get
268272
269273
:type client: :class:`google.cloud.dns.client.Client`
270-
:param client: (Optional) the client to use. If not passed, falls back to the
271-
``client`` stored on the current zone.
274+
:param client:
275+
(Optional) the client to use. If not passed, falls back to the
276+
``client`` stored on the current zone.
272277
273278
:rtype: bool
274279
:returns: Boolean indicating existence of the managed zone.
@@ -290,8 +295,9 @@ def reload(self, client=None):
290295
https://cloud.google.com/dns/api/v1/managedZones/get
291296
292297
:type client: :class:`google.cloud.dns.client.Client`
293-
:param client: (Optional) the client to use. If not passed, falls back to the
294-
``client`` stored on the current zone.
298+
:param client:
299+
(Optional) the client to use. If not passed, falls back to the
300+
``client`` stored on the current zone.
295301
"""
296302
client = self._require_client(client)
297303

@@ -306,8 +312,9 @@ def delete(self, client=None):
306312
https://cloud.google.com/dns/api/v1/managedZones/delete
307313
308314
:type client: :class:`google.cloud.dns.client.Client`
309-
:param client: (Optional) the client to use. If not passed, falls back to the
310-
``client`` stored on the current zone.
315+
:param client:
316+
(Optional) the client to use. If not passed, falls back to the
317+
``client`` stored on the current zone.
311318
"""
312319
client = self._require_client(client)
313320
client.connection.api_request(method='DELETE', path=self.path)
@@ -329,8 +336,9 @@ def list_resource_record_sets(self, max_results=None, page_token=None,
329336
zones.
330337
331338
:type client: :class:`google.cloud.dns.client.Client`
332-
:param client: (Optional) the client to use. If not passed, falls back to the
333-
``client`` stored on the current zone.
339+
:param client:
340+
(Optional) the client to use. If not passed, falls back to the
341+
``client`` stored on the current zone.
334342
335343
:rtype: :class:`~google.cloud.iterator.Iterator`
336344
:returns: Iterator of :class:`~.resource_record_set.ResourceRecordSet`
@@ -362,8 +370,9 @@ def list_changes(self, max_results=None, page_token=None, client=None):
362370
zones.
363371
364372
:type client: :class:`google.cloud.dns.client.Client`
365-
:param client: (Optional) the client to use. If not passed, falls back to the
366-
``client`` stored on the current zone.
373+
:param client:
374+
(Optional) the client to use. If not passed, falls back to the
375+
``client`` stored on the current zone.
367376
368377
:rtype: :class:`~google.cloud.iterator.Iterator`
369378
:returns: Iterator of :class:`~.changes.Changes`

0 commit comments

Comments
 (0)