Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(webrisk): add 2.7 deprecation warning; bump copyright year to 2020; use templated noxfile (via synth) #10053

Merged
merged 5 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions webrisk/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
u"google-cloud-webrisk Documentation",
author,
"manual",
),
)
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -320,7 +320,7 @@
"google-cloud-webrisk",
"GAPIC library for the {metadata.shortName} v1beta1 service",
"APIs",
),
)
]

# Documents to append as an appendix to all manuals.
Expand Down
2 changes: 1 addition & 1 deletion webrisk/google/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion webrisk/google/cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 2 additions & 6 deletions webrisk/google/cloud/webrisk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,4 @@
from google.cloud.webrisk_v1beta1 import types


__all__ = (
"enums",
"types",
"WebRiskServiceV1Beta1Client",
)
__all__ = ("enums", "types", "WebRiskServiceV1Beta1Client")
19 changes: 13 additions & 6 deletions webrisk/google/cloud/webrisk_v1beta1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,21 +16,28 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.webrisk_v1beta1 import types
from google.cloud.webrisk_v1beta1.gapic import enums
from google.cloud.webrisk_v1beta1.gapic import web_risk_service_v1_beta1_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class WebRiskServiceV1Beta1Client(
web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client
):
__doc__ = web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client.__doc__
enums = enums


__all__ = (
"enums",
"types",
"WebRiskServiceV1Beta1Client",
)
__all__ = ("enums", "types", "WebRiskServiceV1Beta1Client")
2 changes: 1 addition & 1 deletion webrisk/google/cloud/webrisk_v1beta1/gapic/enums.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,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 @@ -74,7 +74,7 @@ def __init__(
self._stubs = {
"web_risk_service_v1_beta1_stub": webrisk_pb2_grpc.WebRiskServiceV1Beta1Stub(
channel
),
)
}

@classmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@
from google.cloud.webrisk_v1beta1.proto import webrisk_pb2_grpc


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


class WebRiskServiceV1Beta1Client(object):
Expand Down Expand Up @@ -159,12 +159,12 @@ def __init__(
self.transport = transport
else:
self.transport = web_risk_service_v1_beta1_grpc_transport.WebRiskServiceV1Beta1GrpcTransport(
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 @@ -175,7 +175,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 Expand Up @@ -316,7 +316,7 @@ def search_uris(
client_info=self._client_info,
)

request = webrisk_pb2.SearchUrisRequest(uri=uri, threat_types=threat_types,)
request = webrisk_pb2.SearchUrisRequest(uri=uri, threat_types=threat_types)
return self._inner_api_calls["search_uris"](
request, retry=retry, timeout=timeout, metadata=metadata
)
Expand Down Expand Up @@ -382,7 +382,7 @@ def search_hashes(
)

request = webrisk_pb2.SearchHashesRequest(
threat_types=threat_types, hash_prefix=hash_prefix,
threat_types=threat_types, hash_prefix=hash_prefix
)
return self._inner_api_calls["search_hashes"](
request, retry=retry, timeout=timeout, metadata=metadata
Expand Down
38 changes: 21 additions & 17 deletions webrisk/google/cloud/webrisk_v1beta1/proto/webrisk_pb2.py

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

10 changes: 3 additions & 7 deletions webrisk/google/cloud/webrisk_v1beta1/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,13 +24,9 @@
from google.protobuf import timestamp_pb2


_shared_modules = [
timestamp_pb2,
]
_shared_modules = [timestamp_pb2]

_local_modules = [
webrisk_pb2,
]
_local_modules = [webrisk_pb2]

names = []

Expand Down
Loading