Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb270311

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

File tree

15 files changed

+210
-124
lines changed

15 files changed

+210
-124
lines changed

‎webrisk/docs/conf.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
u"google-cloud-webrisk Documentation",
265265
author,
266266
"manual",
267-
),
267+
)
268268
]
269269

270270
# The name of an image file (relative to this directory) to place at the top of
@@ -320,7 +320,7 @@
320320
"google-cloud-webrisk",
321321
"GAPIC library for the {metadata.shortName} v1beta1 service",
322322
"APIs",
323-
),
323+
)
324324
]
325325

326326
# Documents to append as an appendix to all manuals.

‎webrisk/google/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎webrisk/google/cloud/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎webrisk/google/cloud/webrisk.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -22,8 +22,4 @@
2222
fromgoogle.cloud.webrisk_v1beta1importtypes
2323

2424

25-
__all__= (
26-
"enums",
27-
"types",
28-
"WebRiskServiceV1Beta1Client",
29-
)
25+
__all__= ("enums","types","WebRiskServiceV1Beta1Client")

‎webrisk/google/cloud/webrisk_v1beta1/__init__.py‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,21 +16,28 @@
1616

1717

1818
from __future__importabsolute_import
19+
importsys
20+
importwarnings
1921

2022
fromgoogle.cloud.webrisk_v1beta1importtypes
2123
fromgoogle.cloud.webrisk_v1beta1.gapicimportenums
2224
fromgoogle.cloud.webrisk_v1beta1.gapicimportweb_risk_service_v1_beta1_client
2325

2426

27+
ifsys.version_info[:2]== (2,7):
28+
message= (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message,DeprecationWarning)
34+
35+
2536
classWebRiskServiceV1Beta1Client(
2637
web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client
2738
):
2839
__doc__=web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client.__doc__
2940
enums=enums
3041

3142

32-
__all__= (
33-
"enums",
34-
"types",
35-
"WebRiskServiceV1Beta1Client",
36-
)
43+
__all__= ("enums","types","WebRiskServiceV1Beta1Client")

‎webrisk/google/cloud/webrisk_v1beta1/gapic/enums.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎webrisk/google/cloud/webrisk_v1beta1/gapic/transports/web_risk_service_v1_beta1_grpc_transport.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ def __init__(
5353
# exception (channels come with credentials baked in already).
5454
ifchannelisnotNoneandcredentialsisnotNone:
5555
raiseValueError(
56-
"The `channel` and `credentials` arguments are mutually ""exclusive.",
56+
"The `channel` and `credentials` arguments are mutually ""exclusive."
5757
)
5858

5959
# Create the channel.
@@ -74,7 +74,7 @@ def __init__(
7474
self._stubs= {
7575
"web_risk_service_v1_beta1_stub":webrisk_pb2_grpc.WebRiskServiceV1Beta1Stub(
7676
channel
77-
),
77+
)
7878
}
7979

8080
@classmethod

‎webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@
3636
fromgoogle.cloud.webrisk_v1beta1.protoimportwebrisk_pb2_grpc
3737

3838

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

4141

4242
classWebRiskServiceV1Beta1Client(object):
@@ -159,12 +159,12 @@ def __init__(
159159
self.transport=transport
160160
else:
161161
self.transport=web_risk_service_v1_beta1_grpc_transport.WebRiskServiceV1Beta1GrpcTransport(
162-
address=api_endpoint,channel=channel,credentials=credentials,
162+
address=api_endpoint,channel=channel,credentials=credentials
163163
)
164164

165165
ifclient_infoisNone:
166166
client_info=google.api_core.gapic_v1.client_info.ClientInfo(
167-
gapic_version=_GAPIC_LIBRARY_VERSION,
167+
gapic_version=_GAPIC_LIBRARY_VERSION
168168
)
169169
else:
170170
client_info.gapic_version=_GAPIC_LIBRARY_VERSION
@@ -175,7 +175,7 @@ def __init__(
175175
# (Ordinarily, these are the defaults specified in the `*_config.py`
176176
# file next to this one.)
177177
self._method_configs=google.api_core.gapic_v1.config.parse_method_configs(
178-
client_config["interfaces"][self._INTERFACE_NAME],
178+
client_config["interfaces"][self._INTERFACE_NAME]
179179
)
180180

181181
# Save a dictionary of cached API call functions.
@@ -316,7 +316,7 @@ def search_uris(
316316
client_info=self._client_info,
317317
)
318318

319-
request=webrisk_pb2.SearchUrisRequest(uri=uri,threat_types=threat_types,)
319+
request=webrisk_pb2.SearchUrisRequest(uri=uri,threat_types=threat_types)
320320
returnself._inner_api_calls["search_uris"](
321321
request,retry=retry,timeout=timeout,metadata=metadata
322322
)
@@ -382,7 +382,7 @@ def search_hashes(
382382
)
383383

384384
request=webrisk_pb2.SearchHashesRequest(
385-
threat_types=threat_types,hash_prefix=hash_prefix,
385+
threat_types=threat_types,hash_prefix=hash_prefix
386386
)
387387
returnself._inner_api_calls["search_hashes"](
388388
request,retry=retry,timeout=timeout,metadata=metadata

‎webrisk/google/cloud/webrisk_v1beta1/proto/webrisk_pb2.py‎

Lines changed: 21 additions & 17 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎webrisk/google/cloud/webrisk_v1beta1/types.py‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright2019 Google LLC
3+
# Copyright2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -24,13 +24,9 @@
2424
fromgoogle.protobufimporttimestamp_pb2
2525

2626

27-
_shared_modules= [
28-
timestamp_pb2,
29-
]
27+
_shared_modules= [timestamp_pb2]
3028

31-
_local_modules= [
32-
webrisk_pb2,
33-
]
29+
_local_modules= [webrisk_pb2]
3430

3531
names= []
3632

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp