Skip to content

Commit

Permalink
chore: sort imports (#761)
Browse files Browse the repository at this point in the history
* chore: sort imports

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
tswast and gcf-owl-bot[bot] committed Mar 19, 2024
1 parent 5f557a7 commit bc806ae
Show file tree
Hide file tree
Showing 76 changed files with 291 additions and 434 deletions.
2 changes: 1 addition & 1 deletion 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
77 changes: 39 additions & 38 deletions google/cloud/bigquery_storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,52 +19,53 @@


from google.cloud.bigquery_storage_v1 import BigQueryReadClient
from google.cloud.bigquery_storage_v1 import gapic_types as types
from google.cloud.bigquery_storage_v1.services.big_query_write.async_client import (
BigQueryWriteAsyncClient,
)
from google.cloud.bigquery_storage_v1.services.big_query_write.client import (
BigQueryWriteClient,
)
from google.cloud.bigquery_storage_v1.services.big_query_write.async_client import (
BigQueryWriteAsyncClient,
from google.cloud.bigquery_storage_v1.types.arrow import (
ArrowRecordBatch,
ArrowSchema,
ArrowSerializationOptions,
)

from google.cloud.bigquery_storage_v1 import gapic_types as types
from google.cloud.bigquery_storage_v1.types.arrow import ArrowRecordBatch
from google.cloud.bigquery_storage_v1.types.arrow import ArrowSchema
from google.cloud.bigquery_storage_v1.types.arrow import ArrowSerializationOptions
from google.cloud.bigquery_storage_v1.types.avro import AvroRows
from google.cloud.bigquery_storage_v1.types.avro import AvroSchema
from google.cloud.bigquery_storage_v1.types.avro import AvroSerializationOptions
from google.cloud.bigquery_storage_v1.types.protobuf import ProtoRows
from google.cloud.bigquery_storage_v1.types.protobuf import ProtoSchema
from google.cloud.bigquery_storage_v1.types.storage import AppendRowsRequest
from google.cloud.bigquery_storage_v1.types.storage import AppendRowsResponse
from google.cloud.bigquery_storage_v1.types.storage import (
BatchCommitWriteStreamsRequest,
from google.cloud.bigquery_storage_v1.types.avro import (
AvroRows,
AvroSchema,
AvroSerializationOptions,
)
from google.cloud.bigquery_storage_v1.types.protobuf import ProtoRows, ProtoSchema
from google.cloud.bigquery_storage_v1.types.storage import (
AppendRowsRequest,
AppendRowsResponse,
BatchCommitWriteStreamsRequest,
BatchCommitWriteStreamsResponse,
CreateReadSessionRequest,
CreateWriteStreamRequest,
FinalizeWriteStreamRequest,
FinalizeWriteStreamResponse,
FlushRowsRequest,
FlushRowsResponse,
GetWriteStreamRequest,
ReadRowsRequest,
ReadRowsResponse,
RowError,
SplitReadStreamRequest,
SplitReadStreamResponse,
StorageError,
StreamStats,
ThrottleState,
)
from google.cloud.bigquery_storage_v1.types.stream import (
DataFormat,
ReadSession,
ReadStream,
WriteStream,
WriteStreamView,
)
from google.cloud.bigquery_storage_v1.types.storage import CreateReadSessionRequest
from google.cloud.bigquery_storage_v1.types.storage import CreateWriteStreamRequest
from google.cloud.bigquery_storage_v1.types.storage import FinalizeWriteStreamRequest
from google.cloud.bigquery_storage_v1.types.storage import FinalizeWriteStreamResponse
from google.cloud.bigquery_storage_v1.types.storage import FlushRowsRequest
from google.cloud.bigquery_storage_v1.types.storage import FlushRowsResponse
from google.cloud.bigquery_storage_v1.types.storage import GetWriteStreamRequest
from google.cloud.bigquery_storage_v1.types.storage import ReadRowsRequest
from google.cloud.bigquery_storage_v1.types.storage import ReadRowsResponse
from google.cloud.bigquery_storage_v1.types.storage import RowError
from google.cloud.bigquery_storage_v1.types.storage import SplitReadStreamRequest
from google.cloud.bigquery_storage_v1.types.storage import SplitReadStreamResponse
from google.cloud.bigquery_storage_v1.types.storage import StorageError
from google.cloud.bigquery_storage_v1.types.storage import StreamStats
from google.cloud.bigquery_storage_v1.types.storage import ThrottleState
from google.cloud.bigquery_storage_v1.types.stream import ReadSession
from google.cloud.bigquery_storage_v1.types.stream import ReadStream
from google.cloud.bigquery_storage_v1.types.stream import WriteStream
from google.cloud.bigquery_storage_v1.types.stream import DataFormat
from google.cloud.bigquery_storage_v1.types.stream import WriteStreamView
from google.cloud.bigquery_storage_v1.types.table import TableFieldSchema
from google.cloud.bigquery_storage_v1.types.table import TableSchema
from google.cloud.bigquery_storage_v1.types.table import TableFieldSchema, TableSchema

__all__ = (
"BigQueryReadClient",
Expand Down
3 changes: 1 addition & 2 deletions google/cloud/bigquery_storage_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

__version__ = package_version.__version__

from google.cloud.bigquery_storage_v1 import client
from google.cloud.bigquery_storage_v1 import types
from google.cloud.bigquery_storage_v1 import client, types


class BigQueryReadClient(client.BigQueryReadClient):
Expand Down
4 changes: 1 addition & 3 deletions google/cloud/bigquery_storage_v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
import google.api_core.gapic_v1.method

from google.cloud.bigquery_storage_v1 import reader
from google.cloud.bigquery_storage_v1.services import big_query_read
from google.cloud.bigquery_storage_v1.services import big_query_write

from google.cloud.bigquery_storage_v1.services import big_query_read, big_query_write

_SCOPES = (
"https://www.googleapis.com/auth/bigquery",
Expand Down
10 changes: 3 additions & 7 deletions google/cloud/bigquery_storage_v1/gapic_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@
import inspect
import sys

import proto

from google.cloud.bigquery_storage_v1.types import arrow
from google.cloud.bigquery_storage_v1.types import avro
from google.cloud.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream

from google.protobuf import message as protobuf_message
from google.protobuf import timestamp_pb2
import proto

from google.cloud.bigquery_storage_v1.types import arrow, avro, storage, stream


# The current api core helper does not find new proto messages of type proto.Message,
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 BigQueryReadClient
from .async_client import BigQueryReadAsyncClient
from .client import BigQueryReadClient

__all__ = (
"BigQueryReadClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,40 @@
import functools
import re
from typing import (
AsyncIterable,
Awaitable,
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
AsyncIterable,
Awaitable,
Sequence,
Tuple,
Type,
Union,
)

from google.cloud.bigquery_storage_v1 import gapic_version as package_version

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_async 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

from google.cloud.bigquery_storage_v1 import gapic_version as package_version

try:
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore

from google.cloud.bigquery_storage_v1.types import arrow
from google.cloud.bigquery_storage_v1.types import avro
from google.cloud.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import BigQueryReadTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import BigQueryReadGrpcAsyncIOTransport

from google.cloud.bigquery_storage_v1.types import arrow, avro, storage, stream

from .client import BigQueryReadClient
from .transports.base import DEFAULT_CLIENT_INFO, BigQueryReadTransport
from .transports.grpc_asyncio import BigQueryReadGrpcAsyncIOTransport


class BigQueryReadAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import re
from typing import (
Dict,
Iterable,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Iterable,
Sequence,
Tuple,
Type,
Expand All @@ -31,29 +31,28 @@
)
import warnings

from google.cloud.bigquery_storage_v1 import gapic_version as package_version

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

from google.cloud.bigquery_storage_v1 import gapic_version as package_version

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object, None] # type: ignore

from google.cloud.bigquery_storage_v1.types import arrow
from google.cloud.bigquery_storage_v1.types import avro
from google.cloud.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import BigQueryReadTransport, DEFAULT_CLIENT_INFO

from google.cloud.bigquery_storage_v1.types import arrow, avro, storage, stream

from .transports.base import DEFAULT_CLIENT_INFO, BigQueryReadTransport
from .transports.grpc import BigQueryReadGrpcTransport
from .transports.grpc_asyncio import BigQueryReadGrpcAsyncIOTransport

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


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[BigQueryReadTransport]]
_transport_registry["grpc"] = BigQueryReadGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@
import abc
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union

from google.cloud.bigquery_storage_v1 import gapic_version as package_version

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.cloud.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream
from google.cloud.bigquery_storage_v1 import gapic_version as package_version
from google.cloud.bigquery_storage_v1.types import storage, stream

DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +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.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream
from .base import BigQueryReadTransport, DEFAULT_CLIENT_INFO
from google.cloud.bigquery_storage_v1.types import storage, stream

from .base import DEFAULT_CLIENT_INFO, BigQueryReadTransport


class BigQueryReadGrpcTransport(BigQueryReadTransport):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +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.bigquery_storage_v1.types import storage
from google.cloud.bigquery_storage_v1.types import stream
from .base import BigQueryReadTransport, DEFAULT_CLIENT_INFO
from google.cloud.bigquery_storage_v1.types import storage, stream

from .base import DEFAULT_CLIENT_INFO, BigQueryReadTransport
from .grpc import BigQueryReadGrpcTransport


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 BigQueryWriteClient
from .async_client import BigQueryWriteAsyncClient
from .client import BigQueryWriteClient

__all__ = (
"BigQueryWriteClient",
Expand Down
Loading

0 comments on commit bc806ae

Please sign in to comment.