Skip to content

Commit 1b12b2d

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

7 files changed

Lines changed: 55 additions & 47 deletions

File tree

packages/google-cloud-monitoring/google/cloud/monitoring/_dataframe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def _build_dataframe(time_series_iterable,
3636
3737
:type label: str
3838
:param label:
39-
(Optional) The label name to use for the dataframe header. This can be the name
40-
of a resource label or metric label (e.g., ``"instance_name"``), or
41-
the string ``"resource_type"``.
39+
(Optional) The label name to use for the dataframe header. This can be
40+
the name of a resource label or metric label (e.g.,
41+
``"instance_name"``), or the string ``"resource_type"``.
4242
4343
:type labels: list of strings, or None
4444
:param labels:

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def query(self,
8989
`supported metrics`_.
9090
9191
:type end_time: :class:`datetime.datetime`
92-
:param end_time: (Optional) The end time (inclusive) of the time interval
92+
:param end_time:
93+
(Optional) The end time (inclusive) of the time interval
9394
for which results should be returned, as a datetime object.
9495
The default is the start of the current minute.
9596
@@ -364,13 +365,14 @@ def list_metric_descriptors(self, filter_string=None, type_prefix=None):
364365
365366
:type filter_string: str
366367
:param filter_string:
367-
(Optional) An optional filter expression describing the metric descriptors
368-
to be returned. See the `filter documentation`_.
368+
(Optional) An optional filter expression describing the metric
369+
descriptors to be returned. See the `filter documentation`_.
369370
370371
:type type_prefix: str
371-
:param type_prefix: (Optional) An optional prefix constraining the selected
372-
metric types. This adds ``metric.type = starts_with("<prefix>")``
373-
to the filter.
372+
:param type_prefix:
373+
(Optional) An optional prefix constraining the selected metric
374+
types. This adds ``metric.type = starts_with("<prefix>")`` to the
375+
filter.
374376
375377
:rtype:
376378
list of :class:`~google.cloud.monitoring.metric.MetricDescriptor`
@@ -410,8 +412,8 @@ def list_resource_descriptors(self, filter_string=None):
410412
411413
:type filter_string: str
412414
:param filter_string:
413-
(Optional) An optional filter expression describing the resource descriptors
414-
to be returned. See the `filter documentation`_.
415+
(Optional) An optional filter expression describing the resource
416+
descriptors to be returned. See the `filter documentation`_.
415417
416418
:rtype: list of
417419
:class:`~google.cloud.monitoring.resource.ResourceDescriptor`
@@ -435,17 +437,17 @@ def group(self, group_id=None, display_name=None, parent_id=None,
435437
436438
:type display_name: str
437439
:param display_name:
438-
(Optional) A user-assigned name for this group, used only for display
439-
purposes.
440+
(Optional) A user-assigned name for this group, used only for
441+
display purposes.
440442
441443
:type parent_id: str
442444
:param parent_id:
443445
(Optional) The ID of the group's parent, if it has one.
444446
445447
:type filter_string: str
446448
:param filter_string:
447-
(Optional) The filter string used to determine which monitored resources
448-
belong to this group.
449+
(Optional) The filter string used to determine which monitored
450+
resources belong to this group.
449451
450452
:type is_cluster: bool
451453
:param is_cluster:

packages/google-cloud-monitoring/google/cloud/monitoring/group.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ class Group(object):
8181
8282
:type display_name: str
8383
:param display_name:
84-
(Optional) A user-assigned name for this group, used only for display purposes.
84+
(Optional) A user-assigned name for this group, used only for display
85+
purposes.
8586
8687
:type parent_id: str
8788
:param parent_id:
8889
(Optional) The ID of the group's parent, if it has one.
8990
9091
:type filter_string: str
9192
:param filter_string:
92-
(Optional) The filter string used to determine which monitored resources belong to
93-
this group.
93+
(Optional) The filter string used to determine which monitored
94+
resources belong to this group.
9495
9596
:type is_cluster: bool
9697
:param is_cluster:
@@ -298,20 +299,21 @@ def list_members(self, filter_string=None, end_time=None, start_time=None):
298299
299300
:type filter_string: str
300301
:param filter_string:
301-
(Optional) An optional list filter describing the members to be returned. The
302-
filter may reference the type, labels, and metadata of monitored
303-
resources that comprise the group. See the `filter documentation`_.
302+
(Optional) An optional list filter describing the members to be
303+
returned. The filter may reference the type, labels, and metadata
304+
of monitored resources that comprise the group. See the `filter
305+
documentation`_.
304306
305307
:type end_time: :class:`datetime.datetime`
306308
:param end_time:
307-
(Optional) The end time (inclusive) of the time interval for which results
308-
should be returned, as a datetime object. If ``start_time`` is
309-
specified, then this must also be specified.
309+
(Optional) The end time (inclusive) of the time interval for which
310+
results should be returned, as a datetime object. If ``start_time``
311+
is specified, then this must also be specified.
310312
311313
:type start_time: :class:`datetime.datetime`
312314
:param start_time:
313-
(Optional) The start time (exclusive) of the time interval for which results
314-
should be returned, as a datetime object.
315+
(Optional) The start time (exclusive) of the time interval for
316+
which results should be returned, as a datetime object.
315317
316318
:rtype: list of :class:`~google.cloud.monitoring.resource.Resource`
317319
:returns: A list of resource instances.
@@ -388,19 +390,20 @@ def _list(cls, client, children_of_group=None, ancestors_of_group=None,
388390
389391
:type children_of_group: str
390392
:param children_of_group:
391-
(Optional) Returns groups whose parent_name field contains the group name. If
392-
no groups have this parent, the results are empty.
393+
(Optional) Returns groups whose parent_name field contains the
394+
group name. If no groups have this parent, the results are empty.
393395
394396
:type ancestors_of_group: str
395397
:param ancestors_of_group:
396-
(Optional) Returns groups that are ancestors of the specified group. If the
397-
specified group has no immediate parent, the results are empty.
398+
(Optional) Returns groups that are ancestors of the specified
399+
group. If the specified group has no immediate parent, the results
400+
are empty.
398401
399402
:type descendants_of_group: str
400403
:param descendants_of_group:
401-
(Optional) Returns the descendants of the specified group. This is a superset
402-
of the results returned by the children_of_group filter, and
403-
includes children-of-children, and so forth.
404+
(Optional) Returns the descendants of the specified group. This is
405+
a superset of the results returned by the children_of_group filter,
406+
and includes children-of-children, and so forth.
404407
405408
:rtype: list of :class:`~google.cloud.monitoring.group.Group`
406409
:returns: A list of group instances.

packages/google-cloud-monitoring/google/cloud/monitoring/metric.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ def _list(cls, client, filter_string=None, type_prefix=None):
200200
201201
:type filter_string: str
202202
:param filter_string:
203-
(Optional) An optional filter expression describing the metric descriptors
204-
to be returned. See the `filter documentation`_.
203+
(Optional) Filter expression describing the metric descriptors to
204+
be returned. See the `filter documentation`_.
205205
206206
:type type_prefix: str
207-
:param type_prefix: (Optional) An optional prefix constraining the selected
208-
metric types. This adds ``metric.type = starts_with("<prefix>")``
209-
to the filter.
207+
:param type_prefix:
208+
(Optional) Prefix constraining the selected metric types. This adds
209+
``metric.type = starts_with("<prefix>")`` to the filter.
210210
211211
:rtype: list of :class:`MetricDescriptor`
212212
:returns: A list of metric descriptor instances.

packages/google-cloud-monitoring/google/cloud/monitoring/query.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def select_interval(self, end_time, start_time=None):
180180
for which results should be returned, as a datetime object.
181181
182182
:type start_time: :class:`datetime.datetime`
183-
:param start_time: (Optional) The start time (exclusive) of the time interval
183+
:param start_time:
184+
(Optional) The start time (exclusive) of the time interval
184185
for which results should be returned, as a datetime object.
185186
If not specified, the interval is a point in time.
186187
@@ -448,9 +449,9 @@ def iter(self, headers_only=False, page_size=None):
448449
449450
:type page_size: int
450451
:param page_size:
451-
(Optional) An optional positive number specifying the maximum number of
452-
points to return per page. This can be used to control how far
453-
the iterator reads ahead.
452+
(Optional) Positive number specifying the maximum number of points
453+
to return per page. This can be used to control how far the
454+
iterator reads ahead.
454455
455456
:raises: :exc:`ValueError` if the query time interval has not been
456457
specified.
@@ -511,7 +512,8 @@ def _build_query_params(self, headers_only=False,
511512
:class:`~google.cloud.monitoring.timeseries.TimeSeries` objects.
512513
513514
:type page_size: int
514-
:param page_size: (Optional) A limit on the number of points to return per page.
515+
:param page_size:
516+
(Optional) A limit on the number of points to return per page.
515517
516518
:type page_token: str
517519
:param page_token: (Optional) A token to continue the retrieval.
@@ -576,7 +578,8 @@ def as_dataframe(self, label=None, labels=None):
576578
labels=['resource_type', 'instance_id'])
577579
578580
:type label: str
579-
:param label: (Optional) The label name to use for the dataframe header.
581+
:param label:
582+
(Optional) The label name to use for the dataframe header.
580583
This can be the name of a resource label or metric label
581584
(e.g., ``"instance_name"``), or the string ``"resource_type"``.
582585

packages/google-cloud-monitoring/google/cloud/monitoring/resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def _list(cls, client, filter_string=None):
9090
9191
:type filter_string: str
9292
:param filter_string:
93-
(Optional) An optional filter expression describing the resource descriptors
94-
to be returned. See the `filter documentation`_.
93+
(Optional) An optional filter expression describing the resource
94+
descriptors to be returned. See the `filter documentation`_.
9595
9696
:rtype: list of :class:`ResourceDescriptor`
9797
:returns: A list of resource descriptor instances.

packages/google-cloud-monitoring/google/cloud/monitoring/timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class Point(collections.namedtuple('Point', 'end_time start_time value')):
180180
:param end_time: The end time in RFC3339 UTC "Zulu" format.
181181
182182
:type start_time: str
183-
:param start_time: (Optional) An optional start time in RFC3339 UTC "Zulu" format.
183+
:param start_time: (Optional) The start time in RFC3339 UTC "Zulu" format.
184184
185185
:type value: object
186186
:param value: The metric value. This can be a scalar or a distribution.

0 commit comments

Comments
 (0)