| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 113325d commit 4caa8e1
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -220,7 +220,7 @@ def create_channel( | |||
| 220 | 220 | default_host=None, | |
| 221 | 221 | compression=None, | |
| 222 | 222 | attempt_direct_path: Optional[bool] = False, | |
| 223 | - **kwargs | ||
| 223 | + **kwargs, | ||
| 224 | 224 | ): | |
| 225 | 225 | """Create an AsyncIO secure channel with credentials. | |
| 226 | 226 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ def __init__( | |||
| 78 | 78 | result_type, | |
| 79 | 79 | metadata_type=None, | |
| 80 | 80 | polling=polling.DEFAULT_POLLING, | |
| 81 | - **kwargs | ||
| 81 | + **kwargs, | ||
| 82 | 82 | ): | |
| 83 | 83 | super(Operation, self).__init__(polling=polling, **kwargs) | |
| 84 | 84 | self._operation = operation | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ def __init__( | |||
| 48 | 48 | request: operations_pb2.ListOperationsRequest, | |
| 49 | 49 | response: operations_pb2.ListOperationsResponse, | |
| 50 | 50 | *, | |
| 51 | - metadata: Sequence[Tuple[str, str]] = () | ||
| 51 | + metadata: Sequence[Tuple[str, str]] = (), | ||
| 52 | 52 | ): | |
| 53 | 53 | super().__init__( | |
| 54 | 54 | method=method, request=request, response=response, metadata=metadata | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ def __init__( | |||
| 48 | 48 | request: operations_pb2.ListOperationsRequest, | |
| 49 | 49 | response: operations_pb2.ListOperationsResponse, | |
| 50 | 50 | *, | |
| 51 | - metadata: Sequence[Tuple[str, str]] = () | ||
| 51 | + metadata: Sequence[Tuple[str, str]] = (), | ||
| 52 | 52 | ): | |
| 53 | 53 | super().__init__( | |
| 54 | 54 | method=method, request=request, response=response, metadata=metadata | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ def __init__( | |||
| 47 | 47 | request: operations_pb2.ListOperationsRequest, | |
| 48 | 48 | response: operations_pb2.ListOperationsResponse, | |
| 49 | 49 | *, | |
| 50 | - metadata: Sequence[Tuple[str, str]] = () | ||
| 50 | + metadata: Sequence[Tuple[str, str]] = (), | ||
| 51 | 51 | ): | |
| 52 | 52 | """Instantiate the pager. | |
| 53 | 53 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -292,7 +292,6 @@ async def test_next_escaped_characters_in_string( | |||
| 292 | 292 | @pytest.mark.asyncio | |
| 293 | 293 | @pytest.mark.parametrize("response_type", [EchoResponse, httpbody_pb2.HttpBody]) | |
| 294 | 294 | async def test_next_not_array(response_type): | |
| 295 | - | ||
| 296 | 295 | data = '{"hello": 0}' | |
| 297 | 296 | with mock.patch.object( | |
| 298 | 297 | ResponseMock, "content", return_value=mock_async_gen(data) | |
@@ -352,7 +351,6 @@ async def test_check_buffer(response_type, return_value): | |||
| 352 | 351 | @pytest.mark.asyncio | |
| 353 | 352 | @pytest.mark.parametrize("response_type", [EchoResponse, httpbody_pb2.HttpBody]) | |
| 354 | 353 | async def test_next_html(response_type): | |
| 355 | - | ||
| 356 | 354 | data = "<!DOCTYPE html><html></html>" | |
| 357 | 355 | with mock.patch.object( | |
| 358 | 356 | ResponseMock, "content", return_value=mock_async_gen(data) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -226,7 +226,6 @@ def test_operations_client_service_account_always_use_jwt(transport_class): | |||
| 226 | 226 | PYPARAM_CLIENT, | |
| 227 | 227 | ) | |
| 228 | 228 | def test_operations_client_from_service_account_file(client_class): | |
| 229 | - | ||
| 230 | 229 | if "async" in str(client_class): | |
| 231 | 230 | # TODO(): Add support for service account creds to async REST transport. | |
| 232 | 231 | with pytest.raises(NotImplementedError): | |
@@ -547,7 +546,6 @@ def test_operations_client_client_options_credentials_file( | |||
| 547 | 546 | # TODO(): Add support for credentials file to async REST transport. | |
| 548 | 547 | with pytest.raises(core_exceptions.AsyncRestUnsupportedParameterError): | |
| 549 | 548 | with warn_deprecated_credentials_file(): | |
| 550 | - | ||
| 551 | 549 | client_class(client_options=options, transport=transport_name) | |
| 552 | 550 | else: | |
| 553 | 551 | with mock.patch.object(transport_class, "__init__") as patched: | |
@@ -1089,7 +1087,6 @@ async def test_cancel_operation_rest_failure_async(): | |||
| 1089 | 1087 | PYPARAM_CLIENT_TRANSPORT_CREDENTIALS, | |
| 1090 | 1088 | ) | |
| 1091 | 1089 | def test_credentials_transport_error(client_class, transport_class, credentials): | |
| 1092 | - | ||
| 1093 | 1090 | # It is an error to provide credentials and a transport instance. | |
| 1094 | 1091 | transport = transport_class(credentials=credentials) | |
| 1095 | 1092 | with pytest.raises(ValueError): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,6 @@ def test_setup_logging_w_incorrect_scope(): | |||
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | 90 | def test_initialize_logging(): | |
| 91 | - | ||
| 92 | 91 | with mock.patch("os.getenv", return_value="foogle.bar"): | |
| 93 | 92 | with mock.patch("google.api_core.client_logging._BASE_LOGGER_NAME", "foogle"): | |
| 94 | 93 | initialize_logging() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,6 @@ def test_constructor(): | |||
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | 57 | def test_constructor_with_encrypted_cert_source(): | |
| 58 | - | ||
| 59 | 58 | options = client_options.ClientOptions( | |
| 60 | 59 | api_endpoint="foo.googleapis.com", | |
| 61 | 60 | client_encrypted_cert_source=get_client_encrypted_cert, | |
@@ -79,7 +78,6 @@ def test_constructor_with_both_cert_sources(): | |||
| 79 | 78 | ||
| 80 | 79 | ||
| 81 | 80 | def test_constructor_with_api_key(): | |
| 82 | - | ||
| 83 | 81 | options = client_options.ClientOptions( | |
| 84 | 82 | api_endpoint="foo.googleapis.com", | |
| 85 | 83 | client_cert_source=get_client_cert, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -360,7 +360,6 @@ def test__has_next_page_w_max_results_not_done(self): | |||
| 360 | 360 | assert iterator._has_next_page() | |
| 361 | 361 | ||
| 362 | 362 | def test__has_next_page_w_max_results_done(self): | |
| 363 | - | ||
| 364 | 363 | iterator = page_iterator.HTTPIterator( | |
| 365 | 364 | mock.sentinel.client, | |
| 366 | 365 | mock.sentinel.api_request, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments