Skip to content

Commit 532fc5e

Browse files
committed
fix format for monitoring-dashboards
1 parent 2490c1e commit 532fc5e

13 files changed

Lines changed: 55 additions & 37 deletions

File tree

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/async_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18-
from collections import OrderedDict
1918
import functools
2019
import re
20+
from collections import OrderedDict
2121
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2222

23-
from google.api_core import exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
23+
from google.api_core import (
24+
exceptions, # type: ignore
25+
gapic_v1, # type: ignore
26+
)
2527
from google.api_core import retry as retries # type: ignore
2628
from google.api_core.client_options import ClientOptions # type: ignore
2729
from google.auth import credentials # type: ignore
@@ -35,7 +37,6 @@
3537
from .transports.base import DashboardsServiceTransport
3638
from .transports.grpc_asyncio import DashboardsServiceGrpcAsyncIOTransport
3739

38-
3940
try:
4041
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
4142
except AttributeError: # pragma: NO COVER

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/client.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@
1515
# limitations under the License.
1616
#
1717

18-
from collections import OrderedDict
1918
import os
2019
import re
20+
from collections import OrderedDict
2121
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
2222

23-
from google.api_core import exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries
2623
import google.api_core.client_options as client_options_lib # type: ignore
24+
from google.api_core import (
25+
exceptions, # type: ignore
26+
gapic_v1, # type: ignore
27+
)
28+
from google.api_core import retry as retries
2729
from google.auth import credentials # type: ignore
2830
from google.auth.exceptions import MutualTLSChannelError # type: ignore
2931
from google.auth.transport import mtls # type: ignore
@@ -37,7 +39,6 @@
3739
from .transports.grpc import DashboardsServiceGrpcTransport
3840
from .transports.grpc_asyncio import DashboardsServiceGrpcAsyncIOTransport
3941

40-
4142
try:
4243
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
4344
except AttributeError: # pragma: NO COVER
@@ -52,9 +53,7 @@ class DashboardsServiceClientMeta(type):
5253
objects.
5354
"""
5455

55-
_transport_registry = (
56-
OrderedDict()
57-
) # type: Dict[str, Type[DashboardsServiceTransport]]
56+
_transport_registry = OrderedDict() # type: Dict[str, Type[DashboardsServiceTransport]]
5857
_transport_registry["grpc"] = DashboardsServiceGrpcTransport
5958
_transport_registry["grpc_asyncio"] = DashboardsServiceGrpcAsyncIOTransport
6059

@@ -230,8 +229,7 @@ def __init__(
230229
)
231230
if client_options.scopes:
232231
raise ValueError(
233-
"When providing a transport instance, "
234-
"provide its scopes directly."
232+
"When providing a transport instance, provide its scopes directly."
235233
)
236234
self._transport = transport
237235
else:

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/pagers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
request: dashboards_service.ListDashboardsRequest,
4545
response: dashboards_service.ListDashboardsResponse,
4646
*,
47-
metadata: Sequence[Tuple[str, str]] = ()
47+
metadata: Sequence[Tuple[str, str]] = (),
4848
):
4949
"""Instantiate the pager.
5050
@@ -106,7 +106,7 @@ def __init__(
106106
request: dashboards_service.ListDashboardsRequest,
107107
response: dashboards_service.ListDashboardsResponse,
108108
*,
109-
metadata: Sequence[Tuple[str, str]] = ()
109+
metadata: Sequence[Tuple[str, str]] = (),
110110
):
111111
"""Instantiate the pager.
112112

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/transports/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
import abc
1919
import typing
2020

21-
from google.api_core import exceptions # type: ignore
22-
from google.api_core import gapic_v1 # type: ignore
21+
from google.api_core import (
22+
exceptions, # type: ignore
23+
gapic_v1, # type: ignore
24+
)
2325
from google.auth import credentials # type: ignore
2426
from google.protobuf import empty_pb2 as empty # type: ignore
2527

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
from typing import Callable, Dict, Optional, Sequence, Tuple
1919

20+
import grpc # type: ignore
2021
from google.api_core import grpc_helpers # type: ignore
2122
from google.auth import credentials # type: ignore
2223
from google.auth.transport.grpc import SslCredentials # type: ignore
2324
from google.protobuf import empty_pb2 as empty # type: ignore
24-
import grpc # type: ignore
2525

2626
from google import auth # type: ignore
2727
from google.monitoring.dashboard_v1.types import dashboard, dashboards_service
@@ -55,7 +55,7 @@ def __init__(
5555
channel: Optional[grpc.Channel] = None,
5656
api_mtls_endpoint: Optional[str] = None,
5757
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
58-
quota_project_id: Optional[str] = None
58+
quota_project_id: Optional[str] = None,
5959
) -> None:
6060
"""Instantiate the transport.
6161
@@ -149,7 +149,7 @@ def create_channel(
149149
credentials_file: Optional[str] = None,
150150
scopes: Optional[Sequence[str]] = None,
151151
quota_project_id: Optional[str] = None,
152-
**kwargs
152+
**kwargs,
153153
) -> grpc.Channel:
154154
"""Create and return a gRPC channel object.
155155
Args:
@@ -183,7 +183,7 @@ def create_channel(
183183
credentials_file=credentials_file,
184184
scopes=scopes,
185185
quota_project_id=quota_project_id,
186-
**kwargs
186+
**kwargs,
187187
)
188188

189189
@property

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple
1919

20+
import grpc # type: ignore
2021
from google.api_core import grpc_helpers_async # type: ignore
2122
from google.auth import credentials # type: ignore
2223
from google.auth.transport.grpc import SslCredentials # type: ignore
2324
from google.protobuf import empty_pb2 as empty # type: ignore
24-
import grpc # type: ignore
2525
from grpc.experimental import aio # type: ignore
2626

2727
from google.monitoring.dashboard_v1.types import dashboard, dashboards_service

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/types/common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# limitations under the License.
1616
#
1717

18-
from google.protobuf import duration_pb2 as duration # type: ignore
1918
import proto # type: ignore
19+
from google.protobuf import duration_pb2 as duration # type: ignore
2020

2121
__protobuf__ = proto.module(
2222
package="google.monitoring.dashboard.v1",
@@ -142,6 +142,7 @@ class Aligner(proto.Enum):
142142
the data ``value_type`` in the original time series is ``BOOLEAN``,
143143
but the ``value_type`` in the aligned result is ``INT64``.
144144
"""
145+
145146
ALIGN_NONE = 0
146147
ALIGN_DELTA = 1
147148
ALIGN_RATE = 2
@@ -168,6 +169,7 @@ class Reducer(proto.Enum):
168169
value of each data point in the resulting series is a function
169170
of all the already aligned values in the input time series.
170171
"""
172+
171173
REDUCE_NONE = 0
172174
REDUCE_MEAN = 1
173175
REDUCE_MIN = 2
@@ -232,6 +234,7 @@ class Method(proto.Enum):
232234
r"""The value reducers that can be applied to a
233235
``PickTimeSeriesFilter``.
234236
"""
237+
235238
METHOD_UNSPECIFIED = 0
236239
METHOD_MEAN = 1
237240
METHOD_MAX = 2
@@ -241,6 +244,7 @@ class Method(proto.Enum):
241244

242245
class Direction(proto.Enum):
243246
r"""Describes the ranking directions."""
247+
244248
DIRECTION_UNSPECIFIED = 0
245249
TOP = 1
246250
BOTTOM = 2
@@ -280,6 +284,7 @@ class StatisticalTimeSeriesFilter(proto.Message):
280284

281285
class Method(proto.Enum):
282286
r"""The filter methods that can be applied to a stream."""
287+
283288
METHOD_UNSPECIFIED = 0
284289
METHOD_CLUSTER_OUTLIER = 1
285290

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/types/metrics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class SparkChartType(proto.Enum):
3535
r"""Defines the possible types of spark chart supported by the
3636
``Scorecard``.
3737
"""
38+
3839
SPARK_CHART_TYPE_UNSPECIFIED = 0
3940
SPARK_LINE = 1
4041
SPARK_BAR = 2
@@ -236,6 +237,7 @@ class Color(proto.Enum):
236237
provide UX guidance on how users can be expected to interpret a
237238
given state color.
238239
"""
240+
239241
COLOR_UNSPECIFIED = 0
240242
YELLOW = 4
241243
RED = 6
@@ -244,6 +246,7 @@ class Direction(proto.Enum):
244246
r"""Whether the threshold is considered crossed by an actual
245247
value above or below its threshold value.
246248
"""
249+
247250
DIRECTION_UNSPECIFIED = 0
248251
ABOVE = 1
249252
BELOW = 2

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/types/scorecard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# limitations under the License.
1616
#
1717

18-
from google.protobuf import duration_pb2 as duration # type: ignore
1918
import proto # type: ignore
19+
from google.protobuf import duration_pb2 as duration # type: ignore
2020

2121
from google.monitoring.dashboard_v1.types import metrics
2222

packages/google-cloud-monitoring-dashboards/google/monitoring/dashboard_v1/types/text.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Text(proto.Message):
3737

3838
class Format(proto.Enum):
3939
r"""The format type of the text content."""
40+
4041
FORMAT_UNSPECIFIED = 0
4142
MARKDOWN = 1
4243
RAW = 2

0 commit comments

Comments
 (0)