Skip to content

Commit

Permalink
chore(python): add nox session to sort python imports (#68)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@1b71c10
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 21, 2022
1 parent f39230d commit a291cd7
Show file tree
Hide file tree
Showing 23 changed files with 180 additions and 175 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-deploy/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/google-cloud-deploy/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
89 changes: 45 additions & 44 deletions packages/google-cloud-deploy/google/cloud/deploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,54 @@
# limitations under the License.
#

from google.cloud.deploy_v1.services.cloud_deploy.client import CloudDeployClient
from google.cloud.deploy_v1.services.cloud_deploy.async_client import (
CloudDeployAsyncClient,
)

from google.cloud.deploy_v1.types.cloud_deploy import AnthosCluster
from google.cloud.deploy_v1.types.cloud_deploy import ApproveRolloutRequest
from google.cloud.deploy_v1.types.cloud_deploy import ApproveRolloutResponse
from google.cloud.deploy_v1.types.cloud_deploy import BuildArtifact
from google.cloud.deploy_v1.types.cloud_deploy import Config
from google.cloud.deploy_v1.types.cloud_deploy import CreateDeliveryPipelineRequest
from google.cloud.deploy_v1.types.cloud_deploy import CreateReleaseRequest
from google.cloud.deploy_v1.types.cloud_deploy import CreateRolloutRequest
from google.cloud.deploy_v1.types.cloud_deploy import CreateTargetRequest
from google.cloud.deploy_v1.types.cloud_deploy import DefaultPool
from google.cloud.deploy_v1.types.cloud_deploy import DeleteDeliveryPipelineRequest
from google.cloud.deploy_v1.types.cloud_deploy import DeleteTargetRequest
from google.cloud.deploy_v1.types.cloud_deploy import DeliveryPipeline
from google.cloud.deploy_v1.types.cloud_deploy import ExecutionConfig
from google.cloud.deploy_v1.types.cloud_deploy import GetConfigRequest
from google.cloud.deploy_v1.types.cloud_deploy import GetDeliveryPipelineRequest
from google.cloud.deploy_v1.types.cloud_deploy import GetReleaseRequest
from google.cloud.deploy_v1.types.cloud_deploy import GetRolloutRequest
from google.cloud.deploy_v1.types.cloud_deploy import GetTargetRequest
from google.cloud.deploy_v1.types.cloud_deploy import GkeCluster
from google.cloud.deploy_v1.types.cloud_deploy import ListDeliveryPipelinesRequest
from google.cloud.deploy_v1.types.cloud_deploy import ListDeliveryPipelinesResponse
from google.cloud.deploy_v1.types.cloud_deploy import ListReleasesRequest
from google.cloud.deploy_v1.types.cloud_deploy import ListReleasesResponse
from google.cloud.deploy_v1.types.cloud_deploy import ListRolloutsRequest
from google.cloud.deploy_v1.types.cloud_deploy import ListRolloutsResponse
from google.cloud.deploy_v1.types.cloud_deploy import ListTargetsRequest
from google.cloud.deploy_v1.types.cloud_deploy import ListTargetsResponse
from google.cloud.deploy_v1.types.cloud_deploy import OperationMetadata
from google.cloud.deploy_v1.types.cloud_deploy import PipelineCondition
from google.cloud.deploy_v1.types.cloud_deploy import PipelineReadyCondition
from google.cloud.deploy_v1.types.cloud_deploy import PrivatePool
from google.cloud.deploy_v1.types.cloud_deploy import Release
from google.cloud.deploy_v1.types.cloud_deploy import Rollout
from google.cloud.deploy_v1.types.cloud_deploy import SerialPipeline
from google.cloud.deploy_v1.types.cloud_deploy import SkaffoldVersion
from google.cloud.deploy_v1.types.cloud_deploy import Stage
from google.cloud.deploy_v1.types.cloud_deploy import Target
from google.cloud.deploy_v1.types.cloud_deploy import TargetArtifact
from google.cloud.deploy_v1.types.cloud_deploy import TargetsPresentCondition
from google.cloud.deploy_v1.types.cloud_deploy import UpdateDeliveryPipelineRequest
from google.cloud.deploy_v1.types.cloud_deploy import UpdateTargetRequest
from google.cloud.deploy_v1.services.cloud_deploy.client import CloudDeployClient
from google.cloud.deploy_v1.types.cloud_deploy import (
AnthosCluster,
ApproveRolloutRequest,
ApproveRolloutResponse,
BuildArtifact,
Config,
CreateDeliveryPipelineRequest,
CreateReleaseRequest,
CreateRolloutRequest,
CreateTargetRequest,
DefaultPool,
DeleteDeliveryPipelineRequest,
DeleteTargetRequest,
DeliveryPipeline,
ExecutionConfig,
GetConfigRequest,
GetDeliveryPipelineRequest,
GetReleaseRequest,
GetRolloutRequest,
GetTargetRequest,
GkeCluster,
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListReleasesRequest,
ListReleasesResponse,
ListRolloutsRequest,
ListRolloutsResponse,
ListTargetsRequest,
ListTargetsResponse,
OperationMetadata,
PipelineCondition,
PipelineReadyCondition,
PrivatePool,
Release,
Rollout,
SerialPipeline,
SkaffoldVersion,
Stage,
Target,
TargetArtifact,
TargetsPresentCondition,
UpdateDeliveryPipelineRequest,
UpdateTargetRequest,
)
from google.cloud.deploy_v1.types.deliverypipeline_notification_payload import (
DeliveryPipelineNotificationEvent,
)
Expand Down
90 changes: 45 additions & 45 deletions packages/google-cloud-deploy/google/cloud/deploy_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,51 @@
# limitations under the License.
#

from .services.cloud_deploy import CloudDeployClient
from .services.cloud_deploy import CloudDeployAsyncClient

from .types.cloud_deploy import AnthosCluster
from .types.cloud_deploy import ApproveRolloutRequest
from .types.cloud_deploy import ApproveRolloutResponse
from .types.cloud_deploy import BuildArtifact
from .types.cloud_deploy import Config
from .types.cloud_deploy import CreateDeliveryPipelineRequest
from .types.cloud_deploy import CreateReleaseRequest
from .types.cloud_deploy import CreateRolloutRequest
from .types.cloud_deploy import CreateTargetRequest
from .types.cloud_deploy import DefaultPool
from .types.cloud_deploy import DeleteDeliveryPipelineRequest
from .types.cloud_deploy import DeleteTargetRequest
from .types.cloud_deploy import DeliveryPipeline
from .types.cloud_deploy import ExecutionConfig
from .types.cloud_deploy import GetConfigRequest
from .types.cloud_deploy import GetDeliveryPipelineRequest
from .types.cloud_deploy import GetReleaseRequest
from .types.cloud_deploy import GetRolloutRequest
from .types.cloud_deploy import GetTargetRequest
from .types.cloud_deploy import GkeCluster
from .types.cloud_deploy import ListDeliveryPipelinesRequest
from .types.cloud_deploy import ListDeliveryPipelinesResponse
from .types.cloud_deploy import ListReleasesRequest
from .types.cloud_deploy import ListReleasesResponse
from .types.cloud_deploy import ListRolloutsRequest
from .types.cloud_deploy import ListRolloutsResponse
from .types.cloud_deploy import ListTargetsRequest
from .types.cloud_deploy import ListTargetsResponse
from .types.cloud_deploy import OperationMetadata
from .types.cloud_deploy import PipelineCondition
from .types.cloud_deploy import PipelineReadyCondition
from .types.cloud_deploy import PrivatePool
from .types.cloud_deploy import Release
from .types.cloud_deploy import Rollout
from .types.cloud_deploy import SerialPipeline
from .types.cloud_deploy import SkaffoldVersion
from .types.cloud_deploy import Stage
from .types.cloud_deploy import Target
from .types.cloud_deploy import TargetArtifact
from .types.cloud_deploy import TargetsPresentCondition
from .types.cloud_deploy import UpdateDeliveryPipelineRequest
from .types.cloud_deploy import UpdateTargetRequest
from .services.cloud_deploy import CloudDeployAsyncClient, CloudDeployClient
from .types.cloud_deploy import (
AnthosCluster,
ApproveRolloutRequest,
ApproveRolloutResponse,
BuildArtifact,
Config,
CreateDeliveryPipelineRequest,
CreateReleaseRequest,
CreateRolloutRequest,
CreateTargetRequest,
DefaultPool,
DeleteDeliveryPipelineRequest,
DeleteTargetRequest,
DeliveryPipeline,
ExecutionConfig,
GetConfigRequest,
GetDeliveryPipelineRequest,
GetReleaseRequest,
GetRolloutRequest,
GetTargetRequest,
GkeCluster,
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
ListReleasesRequest,
ListReleasesResponse,
ListRolloutsRequest,
ListRolloutsResponse,
ListTargetsRequest,
ListTargetsResponse,
OperationMetadata,
PipelineCondition,
PipelineReadyCondition,
PrivatePool,
Release,
Rollout,
SerialPipeline,
SkaffoldVersion,
Stage,
Target,
TargetArtifact,
TargetsPresentCondition,
UpdateDeliveryPipelineRequest,
UpdateTargetRequest,
)
from .types.deliverypipeline_notification_payload import (
DeliveryPipelineNotificationEvent,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import CloudDeployClient
from .async_client import CloudDeployAsyncClient
from .client import CloudDeployClient

__all__ = (
"CloudDeployClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -33,14 +33,16 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.deploy_v1.services.cloud_deploy import pagers
from google.cloud.deploy_v1.types import cloud_deploy
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 CloudDeployTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import CloudDeployGrpcAsyncIOTransport

from google.cloud.deploy_v1.services.cloud_deploy import pagers
from google.cloud.deploy_v1.types import cloud_deploy

from .client import CloudDeployClient
from .transports.base import DEFAULT_CLIENT_INFO, CloudDeployTransport
from .transports.grpc_asyncio import CloudDeployGrpcAsyncIOTransport


class CloudDeployAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -36,12 +36,14 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.deploy_v1.services.cloud_deploy import pagers
from google.cloud.deploy_v1.types import cloud_deploy
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 CloudDeployTransport, DEFAULT_CLIENT_INFO

from google.cloud.deploy_v1.services.cloud_deploy import pagers
from google.cloud.deploy_v1.types import cloud_deploy

from .transports.base import DEFAULT_CLIENT_INFO, CloudDeployTransport
from .transports.grpc import CloudDeployGrpcTransport
from .transports.grpc_asyncio import CloudDeployGrpcAsyncIOTransport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
AsyncIterator,
Awaitable,
Callable,
Iterator,
Optional,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.deploy_v1.types import cloud_deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .grpc import CloudDeployGrpcTransport
from .grpc_asyncio import CloudDeployGrpcAsyncIOTransport


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudDeployTransport]]
_transport_registry["grpc"] = CloudDeployGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +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 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.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

from google.cloud.deploy_v1.types import cloud_deploy
from google.longrunning import operations_pb2 # type: ignore

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +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 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

from google.longrunning import operations_pb2 # type: ignore
import grpc # type: ignore

from google.cloud.deploy_v1.types import cloud_deploy
from google.longrunning import operations_pb2 # type: ignore
from .base import CloudDeployTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, CloudDeployTransport


class CloudDeployGrpcTransport(CloudDeployTransport):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +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 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
import grpc # type: ignore
from grpc.experimental import aio # type: ignore

from google.cloud.deploy_v1.types import cloud_deploy
from google.longrunning import operations_pb2 # type: ignore
from .base import CloudDeployTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, CloudDeployTransport
from .grpc import CloudDeployGrpcTransport


Expand Down
Loading

0 comments on commit a291cd7

Please sign in to comment.