From c6502088fad58a68d88b7dd540cc7af3f53fac98 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 20:56:10 -0400 Subject: [PATCH] chore(python): add nox session to sort python imports (#33) Source-Link: https://github.com/googleapis/synthtool/commit/1b71c10e20de7ed3f97f692f99a0e3399b67049f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot --- .../.github/.OwlBot.lock.yaml | 4 +- packages/google-cloud-dataplex/docs/conf.py | 2 +- .../google/cloud/dataplex/__init__.py | 170 +++++++++--------- .../google/cloud/dataplex_v1/__init__.py | 160 ++++++++--------- .../services/content_service/__init__.py | 2 +- .../services/content_service/async_client.py | 14 +- .../services/content_service/client.py | 12 +- .../services/content_service/pagers.py | 7 +- .../content_service/transports/__init__.py | 1 - .../content_service/transports/base.py | 6 +- .../content_service/transports/grpc.py | 11 +- .../transports/grpc_asyncio.py | 11 +- .../services/dataplex_service/__init__.py | 2 +- .../services/dataplex_service/async_client.py | 17 +- .../services/dataplex_service/client.py | 15 +- .../services/dataplex_service/pagers.py | 9 +- .../dataplex_service/transports/__init__.py | 1 - .../dataplex_service/transports/base.py | 16 +- .../dataplex_service/transports/grpc.py | 19 +- .../transports/grpc_asyncio.py | 19 +- .../services/metadata_service/__init__.py | 2 +- .../services/metadata_service/async_client.py | 12 +- .../services/metadata_service/client.py | 10 +- .../services/metadata_service/pagers.py | 4 +- .../metadata_service/transports/__init__.py | 1 - .../metadata_service/transports/base.py | 6 +- .../metadata_service/transports/grpc.py | 11 +- .../transports/grpc_asyncio.py | 11 +- .../cloud/dataplex_v1/types/__init__.py | 28 +-- .../google/cloud/dataplex_v1/types/analyze.py | 5 +- .../google/cloud/dataplex_v1/types/content.py | 3 +- .../google/cloud/dataplex_v1/types/logs.py | 4 +- .../cloud/dataplex_v1/types/metadata_.py | 4 +- .../cloud/dataplex_v1/types/resources.py | 4 +- .../google/cloud/dataplex_v1/types/service.py | 8 +- .../google/cloud/dataplex_v1/types/tasks.py | 5 +- packages/google-cloud-dataplex/noxfile.py | 28 ++- packages/google-cloud-dataplex/setup.py | 1 - .../gapic/dataplex_v1/test_content_service.py | 38 ++-- .../dataplex_v1/test_dataplex_service.py | 50 +++--- .../dataplex_v1/test_metadata_service.py | 32 ++-- 41 files changed, 362 insertions(+), 403 deletions(-) diff --git a/packages/google-cloud-dataplex/.github/.OwlBot.lock.yaml b/packages/google-cloud-dataplex/.github/.OwlBot.lock.yaml index bc893c979e20..7c454abf76f3 100644 --- a/packages/google-cloud-dataplex/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-dataplex/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 -# created: 2022-04-06T10:30:21.687684602Z + digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 +# created: 2022-04-20T23:42:53.970438194Z diff --git a/packages/google-cloud-dataplex/docs/conf.py b/packages/google-cloud-dataplex/docs/conf.py index 71d7e0f7d4ac..cdd1cd37ef1e 100644 --- a/packages/google-cloud-dataplex/docs/conf.py +++ b/packages/google-cloud-dataplex/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex/__init__.py index 4e2510ff788c..ed37721a28ff 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex/__init__.py @@ -14,102 +14,104 @@ # limitations under the License. # +from google.cloud.dataplex_v1.services.content_service.async_client import ( + ContentServiceAsyncClient, +) from google.cloud.dataplex_v1.services.content_service.client import ( ContentServiceClient, ) -from google.cloud.dataplex_v1.services.content_service.async_client import ( - ContentServiceAsyncClient, +from google.cloud.dataplex_v1.services.dataplex_service.async_client import ( + DataplexServiceAsyncClient, ) from google.cloud.dataplex_v1.services.dataplex_service.client import ( DataplexServiceClient, ) -from google.cloud.dataplex_v1.services.dataplex_service.async_client import ( - DataplexServiceAsyncClient, +from google.cloud.dataplex_v1.services.metadata_service.async_client import ( + MetadataServiceAsyncClient, ) from google.cloud.dataplex_v1.services.metadata_service.client import ( MetadataServiceClient, ) -from google.cloud.dataplex_v1.services.metadata_service.async_client import ( - MetadataServiceAsyncClient, +from google.cloud.dataplex_v1.types.analyze import Content, Environment, Session +from google.cloud.dataplex_v1.types.content import ( + CreateContentRequest, + DeleteContentRequest, + GetContentRequest, + ListContentRequest, + ListContentResponse, + UpdateContentRequest, ) - -from google.cloud.dataplex_v1.types.analyze import Content -from google.cloud.dataplex_v1.types.analyze import Environment -from google.cloud.dataplex_v1.types.analyze import Session -from google.cloud.dataplex_v1.types.content import CreateContentRequest -from google.cloud.dataplex_v1.types.content import DeleteContentRequest -from google.cloud.dataplex_v1.types.content import GetContentRequest -from google.cloud.dataplex_v1.types.content import ListContentRequest -from google.cloud.dataplex_v1.types.content import ListContentResponse -from google.cloud.dataplex_v1.types.content import UpdateContentRequest -from google.cloud.dataplex_v1.types.logs import DiscoveryEvent -from google.cloud.dataplex_v1.types.logs import JobEvent -from google.cloud.dataplex_v1.types.logs import SessionEvent -from google.cloud.dataplex_v1.types.metadata_ import CreateEntityRequest -from google.cloud.dataplex_v1.types.metadata_ import CreatePartitionRequest -from google.cloud.dataplex_v1.types.metadata_ import DeleteEntityRequest -from google.cloud.dataplex_v1.types.metadata_ import DeletePartitionRequest -from google.cloud.dataplex_v1.types.metadata_ import Entity -from google.cloud.dataplex_v1.types.metadata_ import GetEntityRequest -from google.cloud.dataplex_v1.types.metadata_ import GetPartitionRequest -from google.cloud.dataplex_v1.types.metadata_ import ListEntitiesRequest -from google.cloud.dataplex_v1.types.metadata_ import ListEntitiesResponse -from google.cloud.dataplex_v1.types.metadata_ import ListPartitionsRequest -from google.cloud.dataplex_v1.types.metadata_ import ListPartitionsResponse -from google.cloud.dataplex_v1.types.metadata_ import Partition -from google.cloud.dataplex_v1.types.metadata_ import Schema -from google.cloud.dataplex_v1.types.metadata_ import StorageFormat -from google.cloud.dataplex_v1.types.metadata_ import UpdateEntityRequest -from google.cloud.dataplex_v1.types.metadata_ import StorageSystem -from google.cloud.dataplex_v1.types.resources import Action -from google.cloud.dataplex_v1.types.resources import Asset -from google.cloud.dataplex_v1.types.resources import AssetStatus -from google.cloud.dataplex_v1.types.resources import Lake -from google.cloud.dataplex_v1.types.resources import Zone -from google.cloud.dataplex_v1.types.resources import State -from google.cloud.dataplex_v1.types.service import CancelJobRequest -from google.cloud.dataplex_v1.types.service import CreateAssetRequest -from google.cloud.dataplex_v1.types.service import CreateEnvironmentRequest -from google.cloud.dataplex_v1.types.service import CreateLakeRequest -from google.cloud.dataplex_v1.types.service import CreateTaskRequest -from google.cloud.dataplex_v1.types.service import CreateZoneRequest -from google.cloud.dataplex_v1.types.service import DeleteAssetRequest -from google.cloud.dataplex_v1.types.service import DeleteEnvironmentRequest -from google.cloud.dataplex_v1.types.service import DeleteLakeRequest -from google.cloud.dataplex_v1.types.service import DeleteTaskRequest -from google.cloud.dataplex_v1.types.service import DeleteZoneRequest -from google.cloud.dataplex_v1.types.service import GetAssetRequest -from google.cloud.dataplex_v1.types.service import GetEnvironmentRequest -from google.cloud.dataplex_v1.types.service import GetJobRequest -from google.cloud.dataplex_v1.types.service import GetLakeRequest -from google.cloud.dataplex_v1.types.service import GetTaskRequest -from google.cloud.dataplex_v1.types.service import GetZoneRequest -from google.cloud.dataplex_v1.types.service import ListActionsResponse -from google.cloud.dataplex_v1.types.service import ListAssetActionsRequest -from google.cloud.dataplex_v1.types.service import ListAssetsRequest -from google.cloud.dataplex_v1.types.service import ListAssetsResponse -from google.cloud.dataplex_v1.types.service import ListEnvironmentsRequest -from google.cloud.dataplex_v1.types.service import ListEnvironmentsResponse -from google.cloud.dataplex_v1.types.service import ListJobsRequest -from google.cloud.dataplex_v1.types.service import ListJobsResponse -from google.cloud.dataplex_v1.types.service import ListLakeActionsRequest -from google.cloud.dataplex_v1.types.service import ListLakesRequest -from google.cloud.dataplex_v1.types.service import ListLakesResponse -from google.cloud.dataplex_v1.types.service import ListSessionsRequest -from google.cloud.dataplex_v1.types.service import ListSessionsResponse -from google.cloud.dataplex_v1.types.service import ListTasksRequest -from google.cloud.dataplex_v1.types.service import ListTasksResponse -from google.cloud.dataplex_v1.types.service import ListZoneActionsRequest -from google.cloud.dataplex_v1.types.service import ListZonesRequest -from google.cloud.dataplex_v1.types.service import ListZonesResponse -from google.cloud.dataplex_v1.types.service import OperationMetadata -from google.cloud.dataplex_v1.types.service import UpdateAssetRequest -from google.cloud.dataplex_v1.types.service import UpdateEnvironmentRequest -from google.cloud.dataplex_v1.types.service import UpdateLakeRequest -from google.cloud.dataplex_v1.types.service import UpdateTaskRequest -from google.cloud.dataplex_v1.types.service import UpdateZoneRequest -from google.cloud.dataplex_v1.types.tasks import Job -from google.cloud.dataplex_v1.types.tasks import Task +from google.cloud.dataplex_v1.types.logs import DiscoveryEvent, JobEvent, SessionEvent +from google.cloud.dataplex_v1.types.metadata_ import ( + CreateEntityRequest, + CreatePartitionRequest, + DeleteEntityRequest, + DeletePartitionRequest, + Entity, + GetEntityRequest, + GetPartitionRequest, + ListEntitiesRequest, + ListEntitiesResponse, + ListPartitionsRequest, + ListPartitionsResponse, + Partition, + Schema, + StorageFormat, + StorageSystem, + UpdateEntityRequest, +) +from google.cloud.dataplex_v1.types.resources import ( + Action, + Asset, + AssetStatus, + Lake, + State, + Zone, +) +from google.cloud.dataplex_v1.types.service import ( + CancelJobRequest, + CreateAssetRequest, + CreateEnvironmentRequest, + CreateLakeRequest, + CreateTaskRequest, + CreateZoneRequest, + DeleteAssetRequest, + DeleteEnvironmentRequest, + DeleteLakeRequest, + DeleteTaskRequest, + DeleteZoneRequest, + GetAssetRequest, + GetEnvironmentRequest, + GetJobRequest, + GetLakeRequest, + GetTaskRequest, + GetZoneRequest, + ListActionsResponse, + ListAssetActionsRequest, + ListAssetsRequest, + ListAssetsResponse, + ListEnvironmentsRequest, + ListEnvironmentsResponse, + ListJobsRequest, + ListJobsResponse, + ListLakeActionsRequest, + ListLakesRequest, + ListLakesResponse, + ListSessionsRequest, + ListSessionsResponse, + ListTasksRequest, + ListTasksResponse, + ListZoneActionsRequest, + ListZonesRequest, + ListZonesResponse, + OperationMetadata, + UpdateAssetRequest, + UpdateEnvironmentRequest, + UpdateLakeRequest, + UpdateTaskRequest, + UpdateZoneRequest, +) +from google.cloud.dataplex_v1.types.tasks import Job, Task __all__ = ( "ContentServiceClient", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/__init__.py index 4c86dd6e730c..72a3b30361f7 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/__init__.py @@ -14,90 +14,82 @@ # limitations under the License. # -from .services.content_service import ContentServiceClient -from .services.content_service import ContentServiceAsyncClient -from .services.dataplex_service import DataplexServiceClient -from .services.dataplex_service import DataplexServiceAsyncClient -from .services.metadata_service import MetadataServiceClient -from .services.metadata_service import MetadataServiceAsyncClient - -from .types.analyze import Content -from .types.analyze import Environment -from .types.analyze import Session -from .types.content import CreateContentRequest -from .types.content import DeleteContentRequest -from .types.content import GetContentRequest -from .types.content import ListContentRequest -from .types.content import ListContentResponse -from .types.content import UpdateContentRequest -from .types.logs import DiscoveryEvent -from .types.logs import JobEvent -from .types.logs import SessionEvent -from .types.metadata_ import CreateEntityRequest -from .types.metadata_ import CreatePartitionRequest -from .types.metadata_ import DeleteEntityRequest -from .types.metadata_ import DeletePartitionRequest -from .types.metadata_ import Entity -from .types.metadata_ import GetEntityRequest -from .types.metadata_ import GetPartitionRequest -from .types.metadata_ import ListEntitiesRequest -from .types.metadata_ import ListEntitiesResponse -from .types.metadata_ import ListPartitionsRequest -from .types.metadata_ import ListPartitionsResponse -from .types.metadata_ import Partition -from .types.metadata_ import Schema -from .types.metadata_ import StorageFormat -from .types.metadata_ import UpdateEntityRequest -from .types.metadata_ import StorageSystem -from .types.resources import Action -from .types.resources import Asset -from .types.resources import AssetStatus -from .types.resources import Lake -from .types.resources import Zone -from .types.resources import State -from .types.service import CancelJobRequest -from .types.service import CreateAssetRequest -from .types.service import CreateEnvironmentRequest -from .types.service import CreateLakeRequest -from .types.service import CreateTaskRequest -from .types.service import CreateZoneRequest -from .types.service import DeleteAssetRequest -from .types.service import DeleteEnvironmentRequest -from .types.service import DeleteLakeRequest -from .types.service import DeleteTaskRequest -from .types.service import DeleteZoneRequest -from .types.service import GetAssetRequest -from .types.service import GetEnvironmentRequest -from .types.service import GetJobRequest -from .types.service import GetLakeRequest -from .types.service import GetTaskRequest -from .types.service import GetZoneRequest -from .types.service import ListActionsResponse -from .types.service import ListAssetActionsRequest -from .types.service import ListAssetsRequest -from .types.service import ListAssetsResponse -from .types.service import ListEnvironmentsRequest -from .types.service import ListEnvironmentsResponse -from .types.service import ListJobsRequest -from .types.service import ListJobsResponse -from .types.service import ListLakeActionsRequest -from .types.service import ListLakesRequest -from .types.service import ListLakesResponse -from .types.service import ListSessionsRequest -from .types.service import ListSessionsResponse -from .types.service import ListTasksRequest -from .types.service import ListTasksResponse -from .types.service import ListZoneActionsRequest -from .types.service import ListZonesRequest -from .types.service import ListZonesResponse -from .types.service import OperationMetadata -from .types.service import UpdateAssetRequest -from .types.service import UpdateEnvironmentRequest -from .types.service import UpdateLakeRequest -from .types.service import UpdateTaskRequest -from .types.service import UpdateZoneRequest -from .types.tasks import Job -from .types.tasks import Task +from .services.content_service import ContentServiceAsyncClient, ContentServiceClient +from .services.dataplex_service import DataplexServiceAsyncClient, DataplexServiceClient +from .services.metadata_service import MetadataServiceAsyncClient, MetadataServiceClient +from .types.analyze import Content, Environment, Session +from .types.content import ( + CreateContentRequest, + DeleteContentRequest, + GetContentRequest, + ListContentRequest, + ListContentResponse, + UpdateContentRequest, +) +from .types.logs import DiscoveryEvent, JobEvent, SessionEvent +from .types.metadata_ import ( + CreateEntityRequest, + CreatePartitionRequest, + DeleteEntityRequest, + DeletePartitionRequest, + Entity, + GetEntityRequest, + GetPartitionRequest, + ListEntitiesRequest, + ListEntitiesResponse, + ListPartitionsRequest, + ListPartitionsResponse, + Partition, + Schema, + StorageFormat, + StorageSystem, + UpdateEntityRequest, +) +from .types.resources import Action, Asset, AssetStatus, Lake, State, Zone +from .types.service import ( + CancelJobRequest, + CreateAssetRequest, + CreateEnvironmentRequest, + CreateLakeRequest, + CreateTaskRequest, + CreateZoneRequest, + DeleteAssetRequest, + DeleteEnvironmentRequest, + DeleteLakeRequest, + DeleteTaskRequest, + DeleteZoneRequest, + GetAssetRequest, + GetEnvironmentRequest, + GetJobRequest, + GetLakeRequest, + GetTaskRequest, + GetZoneRequest, + ListActionsResponse, + ListAssetActionsRequest, + ListAssetsRequest, + ListAssetsResponse, + ListEnvironmentsRequest, + ListEnvironmentsResponse, + ListJobsRequest, + ListJobsResponse, + ListLakeActionsRequest, + ListLakesRequest, + ListLakesResponse, + ListSessionsRequest, + ListSessionsResponse, + ListTasksRequest, + ListTasksResponse, + ListZoneActionsRequest, + ListZonesRequest, + ListZonesResponse, + OperationMetadata, + UpdateAssetRequest, + UpdateEnvironmentRequest, + UpdateLakeRequest, + UpdateTaskRequest, + UpdateZoneRequest, +) +from .types.tasks import Job, Task __all__ = ( "ContentServiceAsyncClient", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/__init__.py index cfb5304ed21d..21eab8ba01cb 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import ContentServiceClient from .async_client import ContentServiceAsyncClient +from .client import ContentServiceClient __all__ = ( "ContentServiceClient", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/async_client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/async_client.py index e3294f0353e1..a10a614c0d5c 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/async_client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/async_client.py @@ -17,29 +17,31 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.dataplex_v1.services.content_service import pagers from google.cloud.dataplex_v1.types import analyze from google.cloud.dataplex_v1.types import content from google.cloud.dataplex_v1.types import content as gcd_content -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import ContentServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import ContentServiceGrpcAsyncIOTransport + from .client import ContentServiceClient +from .transports.base import DEFAULT_CLIENT_INFO, ContentServiceTransport +from .transports.grpc_asyncio import ContentServiceGrpcAsyncIOTransport class ContentServiceAsyncClient: diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/client.py index e49089c865ef..f6ee42d806c0 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/client.py @@ -17,30 +17,32 @@ import os import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore +from google.protobuf import field_mask_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.dataplex_v1.services.content_service import pagers from google.cloud.dataplex_v1.types import analyze from google.cloud.dataplex_v1.types import content from google.cloud.dataplex_v1.types import content as gcd_content -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import ContentServiceTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ContentServiceTransport from .transports.grpc import ContentServiceGrpcTransport from .transports.grpc_asyncio import ContentServiceGrpcAsyncIOTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/pagers.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/pagers.py index 4dfe56eb4115..c77bd557f5c2 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/pagers.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/pagers.py @@ -18,14 +18,13 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import content +from google.cloud.dataplex_v1.types import analyze, content class ListContentPager: diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/__init__.py index 2421ed936ec4..3e0ce528be17 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/__init__.py @@ -20,7 +20,6 @@ from .grpc import ContentServiceGrpcTransport from .grpc_asyncio import ContentServiceGrpcAsyncIOTransport - # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ContentServiceTransport]] _transport_registry["grpc"] = ContentServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/base.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/base.py index 1330373bfb7c..4c2a04565407 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/base.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/base.py @@ -15,20 +15,20 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +from google.protobuf import empty_pb2 # type: ignore +import pkg_resources from google.cloud.dataplex_v1.types import analyze from google.cloud.dataplex_v1.types import content from google.cloud.dataplex_v1.types import content as gcd_content -from google.protobuf import empty_pb2 # type: ignore try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc.py index ab464446b514..09cbab363a96 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc.py @@ -13,22 +13,21 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from google.cloud.dataplex_v1.types import analyze from google.cloud.dataplex_v1.types import content from google.cloud.dataplex_v1.types import content as gcd_content -from google.protobuf import empty_pb2 # type: ignore -from .base import ContentServiceTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, ContentServiceTransport class ContentServiceGrpcTransport(ContentServiceTransport): diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc_asyncio.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc_asyncio.py index 0093d505d3f9..44ca79b6d607 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/content_service/transports/grpc_asyncio.py @@ -13,22 +13,21 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async +from google.api_core import gapic_v1, grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore from google.cloud.dataplex_v1.types import analyze from google.cloud.dataplex_v1.types import content from google.cloud.dataplex_v1.types import content as gcd_content -from google.protobuf import empty_pb2 # type: ignore -from .base import ContentServiceTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, ContentServiceTransport from .grpc import ContentServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/__init__.py index 588f53189fef..9ca7a50f1a82 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import DataplexServiceClient from .async_client import DataplexServiceAsyncClient +from .client import DataplexServiceClient __all__ = ( "DataplexServiceClient", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/async_client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/async_client.py index c7ab1df56e39..abc81a409225 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/async_client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/async_client.py @@ -17,14 +17,14 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -33,17 +33,16 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.dataplex_v1.services.dataplex_service import pagers -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import DataplexServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import DataplexServiceGrpcAsyncIOTransport + +from google.cloud.dataplex_v1.services.dataplex_service import pagers +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks + from .client import DataplexServiceClient +from .transports.base import DEFAULT_CLIENT_INFO, DataplexServiceTransport +from .transports.grpc_asyncio import DataplexServiceGrpcAsyncIOTransport class DataplexServiceAsyncClient: diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/client.py index c053e5fb2967..cda5dcc495fa 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/client.py @@ -17,17 +17,17 @@ import os import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,15 +36,14 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.dataplex_v1.services.dataplex_service import pagers -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import DataplexServiceTransport, DEFAULT_CLIENT_INFO + +from google.cloud.dataplex_v1.services.dataplex_service import pagers +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks + +from .transports.base import DEFAULT_CLIENT_INFO, DataplexServiceTransport from .transports.grpc import DataplexServiceGrpcTransport from .transports.grpc_asyncio import DataplexServiceGrpcAsyncIOTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/pagers.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/pagers.py index 9bd1481dd06f..3cacd2d10753 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/pagers.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/pagers.py @@ -18,16 +18,13 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks class ListLakesPager: diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/__init__.py index e1b98862cd6d..e6db0426b023 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/__init__.py @@ -20,7 +20,6 @@ from .grpc import DataplexServiceGrpcTransport from .grpc_asyncio import DataplexServiceGrpcAsyncIOTransport - # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[DataplexServiceTransport]] _transport_registry["grpc"] = DataplexServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/base.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/base.py index cac0f8fa4333..3cfe78d6a20d 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/base.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/base.py @@ -15,23 +15,19 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, operations_v1 from google.api_core import retry as retries -from google.api_core import operations_v1 +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore -from google.oauth2 import service_account # type: ignore - -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks from google.longrunning import operations_pb2 # type: ignore +from google.oauth2 import service_account # type: ignore from google.protobuf import empty_pb2 # type: ignore +import pkg_resources + +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc.py index a649f02abbd5..447cf5c07960 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc.py @@ -13,25 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import operations_v1 -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers, operations_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - -import grpc # type: ignore - -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore -from .base import DataplexServiceTransport, DEFAULT_CLIENT_INFO +import grpc # type: ignore + +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks + +from .base import DEFAULT_CLIENT_INFO, DataplexServiceTransport class DataplexServiceGrpcTransport(DataplexServiceTransport): diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc_asyncio.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc_asyncio.py index 7af4d448b6da..d3974da054c6 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/dataplex_service/transports/grpc_asyncio.py @@ -13,25 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async -from google.api_core import operations_v1 +from google.api_core import gapic_v1, grpc_helpers_async, operations_v1 from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks -from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore -from .base import DataplexServiceTransport, DEFAULT_CLIENT_INFO +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks + +from .base import DEFAULT_CLIENT_INFO, DataplexServiceTransport from .grpc import DataplexServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/__init__.py index 090778e89111..c3e82671e722 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import MetadataServiceClient from .async_client import MetadataServiceAsyncClient +from .client import MetadataServiceClient __all__ = ( "MetadataServiceClient", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/async_client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/async_client.py index 44231239d433..34893958f514 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/async_client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/async_client.py @@ -17,26 +17,28 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.dataplex_v1.services.metadata_service import pagers from google.cloud.dataplex_v1.types import metadata_ -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import MetadataServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import MetadataServiceGrpcAsyncIOTransport + from .client import MetadataServiceClient +from .transports.base import DEFAULT_CLIENT_INFO, MetadataServiceTransport +from .transports.grpc_asyncio import MetadataServiceGrpcAsyncIOTransport class MetadataServiceAsyncClient: diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/client.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/client.py index d53f080a4df9..1a95dc01ee1f 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/client.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/client.py @@ -17,27 +17,29 @@ import os import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + from google.cloud.dataplex_v1.services.metadata_service import pagers from google.cloud.dataplex_v1.types import metadata_ -from google.protobuf import timestamp_pb2 # type: ignore -from .transports.base import MetadataServiceTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, MetadataServiceTransport from .transports.grpc import MetadataServiceGrpcTransport from .transports.grpc_asyncio import MetadataServiceGrpcAsyncIOTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/pagers.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/pagers.py index 405005202903..3e6e7ed42226 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/pagers.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.dataplex_v1.types import metadata_ diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/__init__.py index afbd5b2f2c15..ffdbea43dd24 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/__init__.py @@ -20,7 +20,6 @@ from .grpc import MetadataServiceGrpcTransport from .grpc_asyncio import MetadataServiceGrpcAsyncIOTransport - # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[MetadataServiceTransport]] _transport_registry["grpc"] = MetadataServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/base.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/base.py index eeae1d3cbc8f..6af1295ad599 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/base.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +from google.protobuf import empty_pb2 # type: ignore +import pkg_resources from google.cloud.dataplex_v1.types import metadata_ -from google.protobuf import empty_pb2 # type: ignore try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc.py index b141f74ddfb4..8fe4e61ecc05 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc.py @@ -13,20 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from google.cloud.dataplex_v1.types import metadata_ -from google.protobuf import empty_pb2 # type: ignore -from .base import MetadataServiceTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, MetadataServiceTransport class MetadataServiceGrpcTransport(MetadataServiceTransport): diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc_asyncio.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc_asyncio.py index 8f0cc4e2ab15..1f6ca57fe25b 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/services/metadata_service/transports/grpc_asyncio.py @@ -13,20 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async +from google.api_core import gapic_v1, grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore from google.cloud.dataplex_v1.types import metadata_ -from google.protobuf import empty_pb2 # type: ignore -from .base import MetadataServiceTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, MetadataServiceTransport from .grpc import MetadataServiceGrpcTransport diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/__init__.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/__init__.py index 82bacbb4404b..40bc4f16354d 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/__init__.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/__init__.py @@ -13,11 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .analyze import ( - Content, - Environment, - Session, -) +from .analyze import Content, Environment, Session from .content import ( CreateContentRequest, DeleteContentRequest, @@ -26,11 +22,7 @@ ListContentResponse, UpdateContentRequest, ) -from .logs import ( - DiscoveryEvent, - JobEvent, - SessionEvent, -) +from .logs import DiscoveryEvent, JobEvent, SessionEvent from .metadata_ import ( CreateEntityRequest, CreatePartitionRequest, @@ -46,17 +38,10 @@ Partition, Schema, StorageFormat, - UpdateEntityRequest, StorageSystem, + UpdateEntityRequest, ) -from .resources import ( - Action, - Asset, - AssetStatus, - Lake, - Zone, - State, -) +from .resources import Action, Asset, AssetStatus, Lake, State, Zone from .service import ( CancelJobRequest, CreateAssetRequest, @@ -100,10 +85,7 @@ UpdateTaskRequest, UpdateZoneRequest, ) -from .tasks import ( - Job, - Task, -) +from .tasks import Job, Task __all__ = ( "Content", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/analyze.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/analyze.py index fe93d0eb7a16..e676ed00ffb9 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/analyze.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/analyze.py @@ -13,12 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.dataplex_v1.types import resources from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.dataplex_v1.types import resources __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/content.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/content.py index f75ccb10b0a4..3f589f41de1a 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/content.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/content.py @@ -13,11 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.protobuf import field_mask_pb2 # type: ignore import proto # type: ignore from google.cloud.dataplex_v1.types import analyze -from google.protobuf import field_mask_pb2 # type: ignore - __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/logs.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/logs.py index 58ca7a4685cd..79df942876f6 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/logs.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/logs.py @@ -13,11 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/metadata_.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/metadata_.py index d3bff06d8425..e5dc1f70a035 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/metadata_.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/metadata_.py @@ -13,10 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import timestamp_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/resources.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/resources.py index 5b29f770d5db..52f858545d42 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/resources.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/resources.py @@ -13,11 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/service.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/service.py index bf46f62b1894..dbb82398bec8 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/service.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/service.py @@ -13,14 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import tasks as gcd_tasks from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.dataplex_v1.types import analyze, resources +from google.cloud.dataplex_v1.types import tasks as gcd_tasks __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/tasks.py b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/tasks.py index 88b70653e45e..b57939212286 100644 --- a/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/tasks.py +++ b/packages/google-cloud-dataplex/google/cloud/dataplex_v1/types/tasks.py @@ -13,12 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.dataplex_v1.types import resources from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.dataplex_v1.types import resources __protobuf__ = proto.module( package="google.cloud.dataplex.v1", diff --git a/packages/google-cloud-dataplex/noxfile.py b/packages/google-cloud-dataplex/noxfile.py index 6ee5e8ab96d9..7c1742d2cc93 100644 --- a/packages/google-cloud-dataplex/noxfile.py +++ b/packages/google-cloud-dataplex/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import shutil @@ -25,7 +26,8 @@ import nox BLACK_VERSION = "black==22.3.0" -BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] +ISORT_VERSION = "isort==5.10.1" +LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -83,7 +85,7 @@ def lint(session): session.run( "black", "--check", - *BLACK_PATHS, + *LINT_PATHS, ) session.run("flake8", "google", "tests") @@ -94,7 +96,27 @@ def blacken(session): session.install(BLACK_VERSION) session.run( "black", - *BLACK_PATHS, + *LINT_PATHS, + ) + + +@nox.session(python=DEFAULT_PYTHON_VERSION) +def format(session): + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run( + "isort", + "--fss", + *LINT_PATHS, + ) + session.run( + "black", + *LINT_PATHS, ) diff --git a/packages/google-cloud-dataplex/setup.py b/packages/google-cloud-dataplex/setup.py index 3d760fe514c1..48ace2fae9e5 100644 --- a/packages/google-cloud-dataplex/setup.py +++ b/packages/google-cloud-dataplex/setup.py @@ -19,7 +19,6 @@ import setuptools - name = "google-cloud-dataplex" description = "Dataplex API client library" url = "https://github.com/googleapis/python-dataplex" diff --git a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_content_service.py b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_content_service.py index add3e7217ef5..5e85057f12fd 100644 --- a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_content_service.py +++ b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_content_service.py @@ -13,35 +13,33 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import mock - -import grpc -from grpc.experimental import aio import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule - +import os +from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.dataplex_v1.services.content_service import ContentServiceAsyncClient -from google.cloud.dataplex_v1.services.content_service import ContentServiceClient -from google.cloud.dataplex_v1.services.content_service import pagers -from google.cloud.dataplex_v1.services.content_service import transports -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import content -from google.cloud.dataplex_v1.types import content as gcd_content from google.oauth2 import service_account from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore -import google.auth +import grpc +from grpc.experimental import aio +import mock +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest + +from google.cloud.dataplex_v1.services.content_service import ( + ContentServiceAsyncClient, + ContentServiceClient, + pagers, + transports, +) +from google.cloud.dataplex_v1.types import analyze +from google.cloud.dataplex_v1.types import content +from google.cloud.dataplex_v1.types import content as gcd_content def client_cert_source_callback(): diff --git a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_dataplex_service.py b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_dataplex_service.py index 4d8f38f4eb2c..4db7ef6dfbaf 100644 --- a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_dataplex_service.py +++ b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_dataplex_service.py @@ -13,44 +13,42 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import mock - -import grpc -from grpc.experimental import aio import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule - +import os +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + operation, + operations_v1, + path_template, +) from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import operation from google.api_core import operation_async # type: ignore -from google.api_core import operations_v1 -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.dataplex_v1.services.dataplex_service import ( - DataplexServiceAsyncClient, -) -from google.cloud.dataplex_v1.services.dataplex_service import DataplexServiceClient -from google.cloud.dataplex_v1.services.dataplex_service import pagers -from google.cloud.dataplex_v1.services.dataplex_service import transports -from google.cloud.dataplex_v1.types import analyze -from google.cloud.dataplex_v1.types import resources -from google.cloud.dataplex_v1.types import service -from google.cloud.dataplex_v1.types import tasks from google.longrunning import operations_pb2 from google.oauth2 import service_account from google.protobuf import duration_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore -import google.auth +import grpc +from grpc.experimental import aio +import mock +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest + +from google.cloud.dataplex_v1.services.dataplex_service import ( + DataplexServiceAsyncClient, + DataplexServiceClient, + pagers, + transports, +) +from google.cloud.dataplex_v1.types import analyze, resources, service, tasks def client_cert_source_callback(): diff --git a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_metadata_service.py b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_metadata_service.py index 7b4600021e0d..ab7ced8096c6 100644 --- a/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_metadata_service.py +++ b/packages/google-cloud-dataplex/tests/unit/gapic/dataplex_v1/test_metadata_service.py @@ -13,34 +13,30 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import mock - -import grpc -from grpc.experimental import aio import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule - +import os +from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account +from google.protobuf import timestamp_pb2 # type: ignore +import grpc +from grpc.experimental import aio +import mock +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest + from google.cloud.dataplex_v1.services.metadata_service import ( MetadataServiceAsyncClient, + MetadataServiceClient, + pagers, + transports, ) -from google.cloud.dataplex_v1.services.metadata_service import MetadataServiceClient -from google.cloud.dataplex_v1.services.metadata_service import pagers -from google.cloud.dataplex_v1.services.metadata_service import transports from google.cloud.dataplex_v1.types import metadata_ -from google.oauth2 import service_account -from google.protobuf import timestamp_pb2 # type: ignore -import google.auth def client_cert_source_callback():