diff --git a/google/api_core/operations_v1/abstract_operations_async_client.py b/google/api_core/operations_v1/abstract_operations_async_client.py index c7e3e4a1..12a194f3 100644 --- a/google/api_core/operations_v1/abstract_operations_async_client.py +++ b/google/api_core/operations_v1/abstract_operations_async_client.py @@ -39,7 +39,6 @@ from google.longrunning import operations_pb2 - class AbstractOperationsAsyncClient(AbstractOperationsBaseClient): """Manages long-running operations with an API service for the asynchronous client. @@ -99,7 +98,7 @@ def __init__( creation failed for any reason. """ super().__init__( - credentials=credentials, # type: ignore + credentials=credentials, # type: ignore transport=transport, client_options=client_options, client_info=client_info, diff --git a/google/api_core/operations_v1/abstract_operations_base_client.py b/google/api_core/operations_v1/abstract_operations_base_client.py index 4e52fe19..58135b60 100644 --- a/google/api_core/operations_v1/abstract_operations_base_client.py +++ b/google/api_core/operations_v1/abstract_operations_base_client.py @@ -25,6 +25,7 @@ OperationsTransport, ) from google.api_core.operations_v1.transports.rest import OperationsRestTransport + try: from google.api_core.operations_v1.transports.rest_asyncio import ( OperationsRestAsyncTransport, @@ -70,7 +71,9 @@ def get_transport_class( The transport class to use. """ # If a specific transport is requested, return that one. - if label == "rest_asyncio" and not HAS_ASYNC_REST_DEPENDENCIES: # pragma: NO COVER + if ( + label == "rest_asyncio" and not HAS_ASYNC_REST_DEPENDENCIES + ): # pragma: NO COVER raise ASYNC_REST_EXCEPTION if label: diff --git a/google/api_core/operations_v1/transports/__init__.py b/google/api_core/operations_v1/transports/__init__.py index 052247dd..bf587884 100644 --- a/google/api_core/operations_v1/transports/__init__.py +++ b/google/api_core/operations_v1/transports/__init__.py @@ -34,11 +34,11 @@ if HAS_ASYNC_TRANSPORT: _transport_registry["rest_asyncio"] = OperationsRestAsyncTransport - ASYNC_REST_CLASSES = ("OperationsRestAsyncTransport", ) + ASYNC_REST_CLASSES = ("OperationsRestAsyncTransport",) else: ASYNC_REST_CLASSES = () __all__ = ( "OperationsTransport", "OperationsRestTransport", -) + ASYNC_REST_CLASSES \ No newline at end of file +) + ASYNC_REST_CLASSES diff --git a/google/api_core/operations_v1/transports/rest_asyncio.py b/google/api_core/operations_v1/transports/rest_asyncio.py index 558c5b14..2aeda370 100644 --- a/google/api_core/operations_v1/transports/rest_asyncio.py +++ b/google/api_core/operations_v1/transports/rest_asyncio.py @@ -125,14 +125,14 @@ def __init__( super().__init__( host=host, - credentials=credentials, # type: ignore + credentials=credentials, # type: ignore client_info=client_info, always_use_jwt_access=always_use_jwt_access, ) # TODO(https://github.com/googleapis/python-api-core/issues/708): add support for # `default_host` in AsyncAuthorizedSession for feature parity with the synchronous # code. - self._session = AsyncAuthorizedSession(self._credentials) # type: ignore + self._session = AsyncAuthorizedSession(self._credentials) # type: ignore self._prep_wrapped_messages(client_info) self._http_options = http_options or {} self._path_prefix = path_prefix