Skip to content

Commit

Permalink
chore(python): add nox session to sort python imports (#106)
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 2ddb37d commit 47c8ef8
Show file tree
Hide file tree
Showing 26 changed files with 157 additions and 140 deletions.
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-apigee-connect/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
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,33 @@
# limitations under the License.
#

from google.cloud.apigeeconnect_v1.services.connection_service.client import (
ConnectionServiceClient,
)
from google.cloud.apigeeconnect_v1.services.connection_service.async_client import (
ConnectionServiceAsyncClient,
)
from google.cloud.apigeeconnect_v1.services.tether.client import TetherClient
from google.cloud.apigeeconnect_v1.services.connection_service.client import (
ConnectionServiceClient,
)
from google.cloud.apigeeconnect_v1.services.tether.async_client import TetherAsyncClient

from google.cloud.apigeeconnect_v1.types.connection import Cluster
from google.cloud.apigeeconnect_v1.types.connection import Connection
from google.cloud.apigeeconnect_v1.types.connection import ListConnectionsRequest
from google.cloud.apigeeconnect_v1.types.connection import ListConnectionsResponse
from google.cloud.apigeeconnect_v1.types.tether import EgressRequest
from google.cloud.apigeeconnect_v1.types.tether import EgressResponse
from google.cloud.apigeeconnect_v1.types.tether import Header
from google.cloud.apigeeconnect_v1.types.tether import HttpRequest
from google.cloud.apigeeconnect_v1.types.tether import HttpResponse
from google.cloud.apigeeconnect_v1.types.tether import Payload
from google.cloud.apigeeconnect_v1.types.tether import StreamInfo
from google.cloud.apigeeconnect_v1.types.tether import Url
from google.cloud.apigeeconnect_v1.types.tether import Action
from google.cloud.apigeeconnect_v1.types.tether import Scheme
from google.cloud.apigeeconnect_v1.types.tether import TetherEndpoint
from google.cloud.apigeeconnect_v1.services.tether.client import TetherClient
from google.cloud.apigeeconnect_v1.types.connection import (
Cluster,
Connection,
ListConnectionsRequest,
ListConnectionsResponse,
)
from google.cloud.apigeeconnect_v1.types.tether import (
Action,
EgressRequest,
EgressResponse,
Header,
HttpRequest,
HttpResponse,
Payload,
Scheme,
StreamInfo,
TetherEndpoint,
Url,
)

__all__ = (
"ConnectionServiceClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,30 @@
# limitations under the License.
#

from .services.connection_service import ConnectionServiceClient
from .services.connection_service import ConnectionServiceAsyncClient
from .services.tether import TetherClient
from .services.tether import TetherAsyncClient

from .types.connection import Cluster
from .types.connection import Connection
from .types.connection import ListConnectionsRequest
from .types.connection import ListConnectionsResponse
from .types.tether import EgressRequest
from .types.tether import EgressResponse
from .types.tether import Header
from .types.tether import HttpRequest
from .types.tether import HttpResponse
from .types.tether import Payload
from .types.tether import StreamInfo
from .types.tether import Url
from .types.tether import Action
from .types.tether import Scheme
from .types.tether import TetherEndpoint
from .services.connection_service import (
ConnectionServiceAsyncClient,
ConnectionServiceClient,
)
from .services.tether import TetherAsyncClient, TetherClient
from .types.connection import (
Cluster,
Connection,
ListConnectionsRequest,
ListConnectionsResponse,
)
from .types.tether import (
Action,
EgressRequest,
EgressResponse,
Header,
HttpRequest,
HttpResponse,
Payload,
Scheme,
StreamInfo,
TetherEndpoint,
Url,
)

__all__ = (
"ConnectionServiceAsyncClient",
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 ConnectionServiceClient
from .async_client import ConnectionServiceAsyncClient
from .client import ConnectionServiceClient

__all__ = (
"ConnectionServiceClient",
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,9 +33,10 @@

from google.cloud.apigeeconnect_v1.services.connection_service import pagers
from google.cloud.apigeeconnect_v1.types import connection
from .transports.base import ConnectionServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport

from .client import ConnectionServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, ConnectionServiceTransport
from .transports.grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport


class ConnectionServiceAsyncClient:
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,7 +36,8 @@

from google.cloud.apigeeconnect_v1.services.connection_service import pagers
from google.cloud.apigeeconnect_v1.types import connection
from .transports.base import ConnectionServiceTransport, DEFAULT_CLIENT_INFO

from .transports.base import DEFAULT_CLIENT_INFO, ConnectionServiceTransport
from .transports.grpc import ConnectionServiceGrpcTransport
from .transports.grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport

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.apigeeconnect_v1.types import connection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .grpc import ConnectionServiceGrpcTransport
from .grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[ConnectionServiceTransport]]
_transport_registry["grpc"] = ConnectionServiceGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#
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
import pkg_resources

from google.cloud.apigeeconnect_v1.types import connection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
# 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

import grpc # type: ignore

from google.cloud.apigeeconnect_v1.types import connection
from .base import ConnectionServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, ConnectionServiceTransport


class ConnectionServiceGrpcTransport(ConnectionServiceTransport):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
# 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

import grpc # type: ignore
from grpc.experimental import aio # type: ignore

from google.cloud.apigeeconnect_v1.types import connection
from .base import ConnectionServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, ConnectionServiceTransport
from .grpc import ConnectionServiceGrpcTransport


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 TetherClient
from .async_client import TetherAsyncClient
from .client import TetherClient

__all__ = (
"TetherClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,38 @@
import functools
import re
from typing import (
AsyncIterable,
AsyncIterator,
Awaitable,
Dict,
Mapping,
Optional,
AsyncIterable,
Awaitable,
AsyncIterator,
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.cloud.apigeeconnect_v1.types import tether
from google.protobuf import duration_pb2 # type: ignore
from .transports.base import TetherTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import TetherGrpcAsyncIOTransport

from google.cloud.apigeeconnect_v1.types import tether

from .client import TetherClient
from .transports.base import DEFAULT_CLIENT_INFO, TetherTransport
from .transports.grpc_asyncio import TetherGrpcAsyncIOTransport


class TetherAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,37 @@
import re
from typing import (
Dict,
Mapping,
Optional,
Iterable,
Iterator,
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.cloud.apigeeconnect_v1.types import tether
from google.protobuf import duration_pb2 # type: ignore
from .transports.base import TetherTransport, DEFAULT_CLIENT_INFO

from google.cloud.apigeeconnect_v1.types import tether

from .transports.base import DEFAULT_CLIENT_INFO, TetherTransport
from .transports.grpc import TetherGrpcTransport
from .transports.grpc_asyncio import TetherGrpcAsyncIOTransport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .grpc import TetherGrpcTransport
from .grpc_asyncio import TetherGrpcAsyncIOTransport


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[TetherTransport]]
_transport_registry["grpc"] = TetherGrpcTransport
Expand Down
Loading

0 comments on commit 47c8ef8

Please sign in to comment.