| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -264,7 +264,7 @@ | |||
| 264 | 264 | u"google-cloud-webrisk Documentation", | |
| 265 | 265 | author, | |
| 266 | 266 | "manual", | |
| 267 | - ), | ||
| 267 | + ) | ||
| 268 | 268 | ] | |
| 269 | 269 | ||
| 270 | 270 | # The name of an image file (relative to this directory) to place at the top of | |
@@ -320,7 +320,7 @@ | |||
| 320 | 320 | "google-cloud-webrisk", | |
| 321 | 321 | "GAPIC library for the {metadata.shortName} v1beta1 service", | |
| 322 | 322 | "APIs", | |
| 323 | - ), | ||
| 323 | + ) | ||
| 324 | 324 | ] | |
| 325 | 325 | ||
| 326 | 326 | # Documents to append as an appendix to all manuals. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
@@ -22,8 +22,4 @@ | |||
| 22 | 22 | from google.cloud.webrisk_v1beta1 import types | |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | - __all__ = ( | ||
| 26 | - "enums", | ||
| 27 | - "types", | ||
| 28 | - "WebRiskServiceV1Beta1Client", | ||
| 29 | - ) | ||
| 25 | + __all__ = ("enums", "types", "WebRiskServiceV1Beta1Client") | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
@@ -16,21 +16,28 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | from __future__ import absolute_import | |
| 19 | + import sys | ||
| 20 | + import warnings | ||
| 19 | 21 | ||
| 20 | 22 | from google.cloud.webrisk_v1beta1 import types | |
| 21 | 23 | from google.cloud.webrisk_v1beta1.gapic import enums | |
| 22 | 24 | from google.cloud.webrisk_v1beta1.gapic import web_risk_service_v1_beta1_client | |
| 23 | 25 | ||
| 24 | 26 | ||
| 27 | + if sys.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 | + | ||
| 25 | 36 | class WebRiskServiceV1Beta1Client( | |
| 26 | 37 | web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client | |
| 27 | 38 | ): | |
| 28 | 39 | __doc__ = web_risk_service_v1_beta1_client.WebRiskServiceV1Beta1Client.__doc__ | |
| 29 | 40 | enums = enums | |
| 30 | 41 | ||
| 31 | 42 | ||
| 32 | - __all__ = ( | ||
| 33 | - "enums", | ||
| 34 | - "types", | ||
| 35 | - "WebRiskServiceV1Beta1Client", | ||
| 36 | - ) | ||
| 43 | + __all__ = ("enums", "types", "WebRiskServiceV1Beta1Client") | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
@@ -53,7 +53,7 @@ def __init__( | |||
| 53 | 53 | # exception (channels come with credentials baked in already). | |
| 54 | 54 | if channel is not None and credentials is not None: | |
| 55 | 55 | raise ValueError( | |
| 56 | - "The `channel` and `credentials` arguments are mutually " "exclusive.", | ||
| 56 | + "The `channel` and `credentials` arguments are mutually " "exclusive." | ||
| 57 | 57 | ) | |
| 58 | 58 | ||
| 59 | 59 | # Create the channel. | |
@@ -74,7 +74,7 @@ def __init__( | |||
| 74 | 74 | self._stubs = { | |
| 75 | 75 | "web_risk_service_v1_beta1_stub": webrisk_pb2_grpc.WebRiskServiceV1Beta1Stub( | |
| 76 | 76 | channel | |
| 77 | - ), | ||
| 77 | + ) | ||
| 78 | 78 | } | |
| 79 | 79 | ||
| 80 | 80 | @classmethod | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | from google.cloud.webrisk_v1beta1.proto import webrisk_pb2_grpc | |
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | - _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-webrisk",).version | ||
| 39 | + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-webrisk").version | ||
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | 42 | class WebRiskServiceV1Beta1Client(object): | |
@@ -159,12 +159,12 @@ def __init__( | |||
| 159 | 159 | self.transport = transport | |
| 160 | 160 | else: | |
| 161 | 161 | 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 | ||
| 163 | 163 | ) | |
| 164 | 164 | ||
| 165 | 165 | if client_info is None: | |
| 166 | 166 | client_info = google.api_core.gapic_v1.client_info.ClientInfo( | |
| 167 | - gapic_version=_GAPIC_LIBRARY_VERSION, | ||
| 167 | + gapic_version=_GAPIC_LIBRARY_VERSION | ||
| 168 | 168 | ) | |
| 169 | 169 | else: | |
| 170 | 170 | client_info.gapic_version = _GAPIC_LIBRARY_VERSION | |
@@ -175,7 +175,7 @@ def __init__( | |||
| 175 | 175 | # (Ordinarily, these are the defaults specified in the `*_config.py` | |
| 176 | 176 | # file next to this one.) | |
| 177 | 177 | 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] | ||
| 179 | 179 | ) | |
| 180 | 180 | ||
| 181 | 181 | # Save a dictionary of cached API call functions. | |
@@ -316,7 +316,7 @@ def search_uris( | |||
| 316 | 316 | client_info=self._client_info, | |
| 317 | 317 | ) | |
| 318 | 318 | ||
| 319 | - request = webrisk_pb2.SearchUrisRequest(uri=uri, threat_types=threat_types,) | ||
| 319 | + request = webrisk_pb2.SearchUrisRequest(uri=uri, threat_types=threat_types) | ||
| 320 | 320 | return self._inner_api_calls["search_uris"]( | |
| 321 | 321 | request, retry=retry, timeout=timeout, metadata=metadata | |
| 322 | 322 | ) | |
@@ -382,7 +382,7 @@ def search_hashes( | |||
| 382 | 382 | ) | |
| 383 | 383 | ||
| 384 | 384 | request = webrisk_pb2.SearchHashesRequest( | |
| 385 | - threat_types=threat_types, hash_prefix=hash_prefix, | ||
| 385 | + threat_types=threat_types, hash_prefix=hash_prefix | ||
| 386 | 386 | ) | |
| 387 | 387 | return self._inner_api_calls["search_hashes"]( | |
| 388 | 388 | request, retry=retry, timeout=timeout, metadata=metadata | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | # | |
| 3 | - # Copyright 2019 Google LLC | ||
| 3 | + # Copyright 2020 Google LLC | ||
| 4 | 4 | # | |
| 5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | 6 | # you may not use this file except in compliance with the License. | |
@@ -24,13 +24,9 @@ | |||
| 24 | 24 | from google.protobuf import timestamp_pb2 | |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | - _shared_modules = [ | ||
| 28 | - timestamp_pb2, | ||
| 29 | - ] | ||
| 27 | + _shared_modules = [timestamp_pb2] | ||
| 30 | 28 | ||
| 31 | - _local_modules = [ | ||
| 32 | - webrisk_pb2, | ||
| 33 | - ] | ||
| 29 | + _local_modules = [webrisk_pb2] | ||
| 34 | 30 | ||
| 35 | 31 | names = [] | |
| 36 | 32 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments