Skip to content

Commit

Permalink
chore: use new black and 3.8 for tests (#40)
Browse files Browse the repository at this point in the history
* chore(python): fix line breaks in template and use newer black version

* chore(python): fix line breaks in template

* fix: also update black version

Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Tue Jun 23 02:33:35 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: cf2eff09d0f5319a4dc5cdce2b6356d85af4a798
Source-Link: googleapis/synthtool@cf2eff0
  • Loading branch information
yoshi-automation authored Jul 1, 2020
1 parent e84b181 commit dfc6b8b
Show file tree
Hide file tree
Showing 35 changed files with 191 additions and 125 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-videointelligence/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"grpc": ("https://grpc.io/grpc/python/", None),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
from google.cloud.videointelligence_v1 import types


__all__ = ("enums", "types", "VideoIntelligenceServiceClient")
__all__ = (
"enums",
"types",
"VideoIntelligenceServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ class VideoIntelligenceServiceClient(
enums = enums


__all__ = ("enums", "types", "VideoIntelligenceServiceClient")
__all__ = (
"enums",
"types",
"VideoIntelligenceServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -78,7 +78,7 @@ def __init__(
self._stubs = {
"video_intelligence_service_stub": video_intelligence_pb2_grpc.VideoIntelligenceServiceStub(
channel
)
),
}

# Because this API includes a method that returns a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-videointelligence"
"google-cloud-videointelligence",
).version


Expand Down Expand Up @@ -163,12 +163,12 @@ def __init__(
self.transport = transport
else:
self.transport = video_intelligence_service_grpc_transport.VideoIntelligenceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials
address=api_endpoint, channel=channel, credentials=credentials,
)

if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION
gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
Expand All @@ -179,7 +179,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
client_config["interfaces"][self._INTERFACE_NAME]
client_config["interfaces"][self._INTERFACE_NAME],
)

# Save a dictionary of cached API call functions.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def add_VideoIntelligenceServiceServicer_to_server(servicer, server):
servicer.AnnotateVideo,
request_deserializer=google_dot_cloud_dot_videointelligence__v1_dot_proto_dot_video__intelligence__pb2.AnnotateVideoRequest.FromString,
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
)
),
}
generic_handler = grpc.method_handlers_generic_handler(
"google.cloud.videointelligence.v1.VideoIntelligenceService",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@
from google.rpc import status_pb2


_shared_modules = [operations_pb2, any_pb2, duration_pb2, timestamp_pb2, status_pb2]

_local_modules = [video_intelligence_pb2]
_shared_modules = [
operations_pb2,
any_pb2,
duration_pb2,
timestamp_pb2,
status_pb2,
]

_local_modules = [
video_intelligence_pb2,
]

names = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ class VideoIntelligenceServiceClient(
enums = enums


__all__ = ("enums", "types", "VideoIntelligenceServiceClient")
__all__ = (
"enums",
"types",
"VideoIntelligenceServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -78,7 +78,7 @@ def __init__(
self._stubs = {
"video_intelligence_service_stub": video_intelligence_pb2_grpc.VideoIntelligenceServiceStub(
channel
)
),
}

# Because this API includes a method that returns a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-videointelligence"
"google-cloud-videointelligence",
).version


Expand Down Expand Up @@ -163,12 +163,12 @@ def __init__(
self.transport = transport
else:
self.transport = video_intelligence_service_grpc_transport.VideoIntelligenceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials
address=api_endpoint, channel=channel, credentials=credentials,
)

if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION
gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
Expand All @@ -179,7 +179,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
client_config["interfaces"][self._INTERFACE_NAME]
client_config["interfaces"][self._INTERFACE_NAME],
)

# Save a dictionary of cached API call functions.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def add_VideoIntelligenceServiceServicer_to_server(servicer, server):
servicer.AnnotateVideo,
request_deserializer=google_dot_cloud_dot_videointelligence__v1beta2_dot_proto_dot_video__intelligence__pb2.AnnotateVideoRequest.FromString,
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
)
),
}
generic_handler = grpc.method_handlers_generic_handler(
"google.cloud.videointelligence.v1beta2.VideoIntelligenceService",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@
from google.rpc import status_pb2


_shared_modules = [operations_pb2, any_pb2, duration_pb2, timestamp_pb2, status_pb2]

_local_modules = [video_intelligence_pb2]
_shared_modules = [
operations_pb2,
any_pb2,
duration_pb2,
timestamp_pb2,
status_pb2,
]

_local_modules = [
video_intelligence_pb2,
]

names = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ class VideoIntelligenceServiceClient(
enums = enums


__all__ = ("enums", "types", "VideoIntelligenceServiceClient")
__all__ = (
"enums",
"types",
"VideoIntelligenceServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -78,7 +78,7 @@ def __init__(
self._stubs = {
"video_intelligence_service_stub": video_intelligence_pb2_grpc.VideoIntelligenceServiceStub(
channel
)
),
}

# Because this API includes a method that returns a
Expand Down
Loading

0 comments on commit dfc6b8b

Please sign in to comment.