Skip to content

Commit

Permalink
chore(python): add nox session to sort python imports (#254)
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 6d5aad4 commit 598036a
Show file tree
Hide file tree
Showing 52 changed files with 404 additions and 406 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-tasks/.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-tasks/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
62 changes: 33 additions & 29 deletions packages/google-cloud-tasks/google/cloud/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,42 @@
# limitations under the License.
#

from google.cloud.tasks_v2.services.cloud_tasks.client import CloudTasksClient
from google.cloud.tasks_v2.services.cloud_tasks.async_client import (
CloudTasksAsyncClient,
)

from google.cloud.tasks_v2.types.cloudtasks import CreateQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import CreateTaskRequest
from google.cloud.tasks_v2.types.cloudtasks import DeleteQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import DeleteTaskRequest
from google.cloud.tasks_v2.types.cloudtasks import GetQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import GetTaskRequest
from google.cloud.tasks_v2.types.cloudtasks import ListQueuesRequest
from google.cloud.tasks_v2.types.cloudtasks import ListQueuesResponse
from google.cloud.tasks_v2.types.cloudtasks import ListTasksRequest
from google.cloud.tasks_v2.types.cloudtasks import ListTasksResponse
from google.cloud.tasks_v2.types.cloudtasks import PauseQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import PurgeQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import ResumeQueueRequest
from google.cloud.tasks_v2.types.cloudtasks import RunTaskRequest
from google.cloud.tasks_v2.types.cloudtasks import UpdateQueueRequest
from google.cloud.tasks_v2.types.queue import Queue
from google.cloud.tasks_v2.types.queue import RateLimits
from google.cloud.tasks_v2.types.queue import RetryConfig
from google.cloud.tasks_v2.types.queue import StackdriverLoggingConfig
from google.cloud.tasks_v2.types.target import AppEngineHttpRequest
from google.cloud.tasks_v2.types.target import AppEngineRouting
from google.cloud.tasks_v2.types.target import HttpRequest
from google.cloud.tasks_v2.types.target import OAuthToken
from google.cloud.tasks_v2.types.target import OidcToken
from google.cloud.tasks_v2.types.target import HttpMethod
from google.cloud.tasks_v2.types.task import Attempt
from google.cloud.tasks_v2.types.task import Task
from google.cloud.tasks_v2.services.cloud_tasks.client import CloudTasksClient
from google.cloud.tasks_v2.types.cloudtasks import (
CreateQueueRequest,
CreateTaskRequest,
DeleteQueueRequest,
DeleteTaskRequest,
GetQueueRequest,
GetTaskRequest,
ListQueuesRequest,
ListQueuesResponse,
ListTasksRequest,
ListTasksResponse,
PauseQueueRequest,
PurgeQueueRequest,
ResumeQueueRequest,
RunTaskRequest,
UpdateQueueRequest,
)
from google.cloud.tasks_v2.types.queue import (
Queue,
RateLimits,
RetryConfig,
StackdriverLoggingConfig,
)
from google.cloud.tasks_v2.types.target import (
AppEngineHttpRequest,
AppEngineRouting,
HttpMethod,
HttpRequest,
OAuthToken,
OidcToken,
)
from google.cloud.tasks_v2.types.task import Attempt, Task

__all__ = (
"CloudTasksClient",
Expand Down
58 changes: 28 additions & 30 deletions packages/google-cloud-tasks/google/cloud/tasks_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,34 @@
# limitations under the License.
#

from .services.cloud_tasks import CloudTasksClient
from .services.cloud_tasks import CloudTasksAsyncClient

from .types.cloudtasks import CreateQueueRequest
from .types.cloudtasks import CreateTaskRequest
from .types.cloudtasks import DeleteQueueRequest
from .types.cloudtasks import DeleteTaskRequest
from .types.cloudtasks import GetQueueRequest
from .types.cloudtasks import GetTaskRequest
from .types.cloudtasks import ListQueuesRequest
from .types.cloudtasks import ListQueuesResponse
from .types.cloudtasks import ListTasksRequest
from .types.cloudtasks import ListTasksResponse
from .types.cloudtasks import PauseQueueRequest
from .types.cloudtasks import PurgeQueueRequest
from .types.cloudtasks import ResumeQueueRequest
from .types.cloudtasks import RunTaskRequest
from .types.cloudtasks import UpdateQueueRequest
from .types.queue import Queue
from .types.queue import RateLimits
from .types.queue import RetryConfig
from .types.queue import StackdriverLoggingConfig
from .types.target import AppEngineHttpRequest
from .types.target import AppEngineRouting
from .types.target import HttpRequest
from .types.target import OAuthToken
from .types.target import OidcToken
from .types.target import HttpMethod
from .types.task import Attempt
from .types.task import Task
from .services.cloud_tasks import CloudTasksAsyncClient, CloudTasksClient
from .types.cloudtasks import (
CreateQueueRequest,
CreateTaskRequest,
DeleteQueueRequest,
DeleteTaskRequest,
GetQueueRequest,
GetTaskRequest,
ListQueuesRequest,
ListQueuesResponse,
ListTasksRequest,
ListTasksResponse,
PauseQueueRequest,
PurgeQueueRequest,
ResumeQueueRequest,
RunTaskRequest,
UpdateQueueRequest,
)
from .types.queue import Queue, RateLimits, RetryConfig, StackdriverLoggingConfig
from .types.target import (
AppEngineHttpRequest,
AppEngineRouting,
HttpMethod,
HttpRequest,
OAuthToken,
OidcToken,
)
from .types.task import Attempt, Task

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

__all__ = (
"CloudTasksClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,37 @@
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
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

from google.cloud.tasks_v2.services.cloud_tasks import pagers
from google.cloud.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
from google.cloud.tasks_v2.types import queue as gct_queue
from google.cloud.tasks_v2.types import target
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import task as gct_task
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
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
from .transports.base import CloudTasksTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import CloudTasksGrpcAsyncIOTransport

from .client import CloudTasksClient
from .transports.base import DEFAULT_CLIENT_INFO, CloudTasksTransport
from .transports.grpc_asyncio import CloudTasksGrpcAsyncIOTransport


class CloudTasksAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,38 @@
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
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

from google.cloud.tasks_v2.services.cloud_tasks import pagers
from google.cloud.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
from google.cloud.tasks_v2.types import queue as gct_queue
from google.cloud.tasks_v2.types import target
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import task as gct_task
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
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
from .transports.base import CloudTasksTransport, DEFAULT_CLIENT_INFO

from .transports.base import DEFAULT_CLIENT_INFO, CloudTasksTransport
from .transports.grpc import CloudTasksGrpcTransport
from .transports.grpc_asyncio import CloudTasksGrpcAsyncIOTransport

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

from google.cloud.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import cloudtasks, queue, task


class ListQueuesPager:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .grpc import CloudTasksGrpcTransport
from .grpc_asyncio import CloudTasksGrpcAsyncIOTransport


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudTasksTransport]]
_transport_registry["grpc"] = CloudTasksGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
#
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_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.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
from google.cloud.tasks_v2.types import queue as gct_queue
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import task as gct_task
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import empty_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,26 +13,25 @@
# 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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
import grpc # type: ignore

from google.cloud.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
from google.cloud.tasks_v2.types import queue as gct_queue
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import task as gct_task
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from .base import CloudTasksTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, CloudTasksTransport


class CloudTasksGrpcTransport(CloudTasksTransport):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
# 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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
import grpc # type: ignore
from grpc.experimental import aio # type: ignore

Expand All @@ -29,10 +30,8 @@
from google.cloud.tasks_v2.types import queue as gct_queue
from google.cloud.tasks_v2.types import task
from google.cloud.tasks_v2.types import task as gct_task
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from .base import CloudTasksTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, CloudTasksTransport
from .grpc import CloudTasksGrpcTransport


Expand Down
Loading

0 comments on commit 598036a

Please sign in to comment.