Skip to content

Commit

Permalink
chore(python): add nox session to sort python imports (#312)
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 0b76ff1 commit 4379a8b
Show file tree
Hide file tree
Showing 65 changed files with 355 additions and 396 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-documentai/.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-documentai/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,46 +14,37 @@
# limitations under the License.
#

from google.cloud.documentai_v1.services.document_processor_service.client import (
DocumentProcessorServiceClient,
)
from google.cloud.documentai_v1.services.document_processor_service.async_client import (
DocumentProcessorServiceAsyncClient,
)

from google.cloud.documentai_v1.services.document_processor_service.client import (
DocumentProcessorServiceClient,
)
from google.cloud.documentai_v1.types.document import Document
from google.cloud.documentai_v1.types.document_io import BatchDocumentsInputConfig
from google.cloud.documentai_v1.types.document_io import DocumentOutputConfig
from google.cloud.documentai_v1.types.document_io import GcsDocument
from google.cloud.documentai_v1.types.document_io import GcsDocuments
from google.cloud.documentai_v1.types.document_io import GcsPrefix
from google.cloud.documentai_v1.types.document_io import RawDocument
from google.cloud.documentai_v1.types.document_processor_service import (
BatchProcessMetadata,
from google.cloud.documentai_v1.types.document_io import (
BatchDocumentsInputConfig,
DocumentOutputConfig,
GcsDocument,
GcsDocuments,
GcsPrefix,
RawDocument,
)
from google.cloud.documentai_v1.types.document_processor_service import (
BatchProcessMetadata,
BatchProcessRequest,
)
from google.cloud.documentai_v1.types.document_processor_service import (
BatchProcessResponse,
)
from google.cloud.documentai_v1.types.document_processor_service import (
HumanReviewStatus,
)
from google.cloud.documentai_v1.types.document_processor_service import ProcessRequest
from google.cloud.documentai_v1.types.document_processor_service import ProcessResponse
from google.cloud.documentai_v1.types.document_processor_service import (
ProcessRequest,
ProcessResponse,
ReviewDocumentOperationMetadata,
)
from google.cloud.documentai_v1.types.document_processor_service import (
ReviewDocumentRequest,
)
from google.cloud.documentai_v1.types.document_processor_service import (
ReviewDocumentResponse,
)
from google.cloud.documentai_v1.types.geometry import BoundingPoly
from google.cloud.documentai_v1.types.geometry import NormalizedVertex
from google.cloud.documentai_v1.types.geometry import Vertex
from google.cloud.documentai_v1.types.geometry import (
BoundingPoly,
NormalizedVertex,
Vertex,
)
from google.cloud.documentai_v1.types.operation_metadata import CommonOperationMetadata

__all__ = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,31 @@
# limitations under the License.
#

from .services.document_processor_service import DocumentProcessorServiceClient
from .services.document_processor_service import DocumentProcessorServiceAsyncClient

from .services.document_processor_service import (
DocumentProcessorServiceAsyncClient,
DocumentProcessorServiceClient,
)
from .types.document import Document
from .types.document_io import BatchDocumentsInputConfig
from .types.document_io import DocumentOutputConfig
from .types.document_io import GcsDocument
from .types.document_io import GcsDocuments
from .types.document_io import GcsPrefix
from .types.document_io import RawDocument
from .types.document_processor_service import BatchProcessMetadata
from .types.document_processor_service import BatchProcessRequest
from .types.document_processor_service import BatchProcessResponse
from .types.document_processor_service import HumanReviewStatus
from .types.document_processor_service import ProcessRequest
from .types.document_processor_service import ProcessResponse
from .types.document_processor_service import ReviewDocumentOperationMetadata
from .types.document_processor_service import ReviewDocumentRequest
from .types.document_processor_service import ReviewDocumentResponse
from .types.geometry import BoundingPoly
from .types.geometry import NormalizedVertex
from .types.geometry import Vertex
from .types.document_io import (
BatchDocumentsInputConfig,
DocumentOutputConfig,
GcsDocument,
GcsDocuments,
GcsPrefix,
RawDocument,
)
from .types.document_processor_service import (
BatchProcessMetadata,
BatchProcessRequest,
BatchProcessResponse,
HumanReviewStatus,
ProcessRequest,
ProcessResponse,
ReviewDocumentOperationMetadata,
ReviewDocumentRequest,
ReviewDocumentResponse,
)
from .types.geometry import BoundingPoly, NormalizedVertex, Vertex
from .types.operation_metadata import CommonOperationMetadata

__all__ = (
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 DocumentProcessorServiceClient
from .async_client import DocumentProcessorServiceAsyncClient
from .client import DocumentProcessorServiceClient

__all__ = (
"DocumentProcessorServiceClient",
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,11 +33,12 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.documentai_v1.types import document
from google.cloud.documentai_v1.types import document_processor_service
from .transports.base import DocumentProcessorServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import DocumentProcessorServiceGrpcAsyncIOTransport

from google.cloud.documentai_v1.types import document, document_processor_service

from .client import DocumentProcessorServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, DocumentProcessorServiceTransport
from .transports.grpc_asyncio import DocumentProcessorServiceGrpcAsyncIOTransport


class DocumentProcessorServiceAsyncClient:
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,9 +36,10 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.documentai_v1.types import document
from google.cloud.documentai_v1.types import document_processor_service
from .transports.base import DocumentProcessorServiceTransport, DEFAULT_CLIENT_INFO

from google.cloud.documentai_v1.types import document, document_processor_service

from .transports.base import DEFAULT_CLIENT_INFO, DocumentProcessorServiceTransport
from .transports.grpc import DocumentProcessorServiceGrpcTransport
from .transports.grpc_asyncio import DocumentProcessorServiceGrpcAsyncIOTransport

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


# Compile a registry of transports.
_transport_registry = (
OrderedDict()
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.documentai_v1.types import document_processor_service
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.documentai_v1.types import document_processor_service
from google.longrunning import operations_pb2 # type: ignore
from .base import DocumentProcessorServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, DocumentProcessorServiceTransport


class DocumentProcessorServiceGrpcTransport(DocumentProcessorServiceTransport):
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.documentai_v1.types import document_processor_service
from google.longrunning import operations_pb2 # type: ignore
from .base import DocumentProcessorServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, DocumentProcessorServiceTransport
from .grpc import DocumentProcessorServiceGrpcTransport


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .document import (
Document,
)
from .document import Document
from .document_io import (
BatchDocumentsInputConfig,
DocumentOutputConfig,
Expand All @@ -35,14 +33,8 @@
ReviewDocumentRequest,
ReviewDocumentResponse,
)
from .geometry import (
BoundingPoly,
NormalizedVertex,
Vertex,
)
from .operation_metadata import (
CommonOperationMetadata,
)
from .geometry import BoundingPoly, NormalizedVertex, Vertex
from .operation_metadata import CommonOperationMetadata

__all__ = (
"Document",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore

from google.cloud.documentai_v1.types import geometry
from google.protobuf import timestamp_pb2 # type: ignore
from google.rpc import status_pb2 # type: ignore
from google.type import color_pb2 # type: ignore
from google.type import date_pb2 # type: ignore
from google.type import datetime_pb2 # type: ignore
from google.type import money_pb2 # type: ignore
from google.type import postal_address_pb2 # type: ignore
import proto # type: ignore

from google.cloud.documentai_v1.types import geometry

__protobuf__ = proto.module(
package="google.cloud.documentai.v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
import proto # type: ignore


__protobuf__ = proto.module(
package="google.cloud.documentai.v1",
manifest={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.documentai_v1.types import document as gcd_document
from google.cloud.documentai_v1.types import document_io
from google.cloud.documentai_v1.types import operation_metadata
from google.protobuf import timestamp_pb2 # type: ignore
from google.rpc import status_pb2 # type: ignore
import proto # type: ignore

from google.cloud.documentai_v1.types import document as gcd_document
from google.cloud.documentai_v1.types import document_io, operation_metadata

__protobuf__ = proto.module(
package="google.cloud.documentai.v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
import proto # type: ignore


__protobuf__ = proto.module(
package="google.cloud.documentai.v1",
manifest={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.documentai.v1",
Expand Down
Loading

0 comments on commit 4379a8b

Please sign in to comment.