Skip to content

Commit

Permalink
chore(python): add nox session to sort python imports (#143)
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 7215ccb commit d7e8130
Show file tree
Hide file tree
Showing 28 changed files with 173 additions and 164 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-data-qna/.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-data-qna/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
49 changes: 24 additions & 25 deletions packages/google-cloud-data-qna/google/cloud/dataqna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,43 @@
# limitations under the License.
#

from google.cloud.dataqna_v1alpha.services.auto_suggestion_service.client import (
AutoSuggestionServiceClient,
)
from google.cloud.dataqna_v1alpha.services.auto_suggestion_service.async_client import (
AutoSuggestionServiceAsyncClient,
)
from google.cloud.dataqna_v1alpha.services.question_service.client import (
QuestionServiceClient,
from google.cloud.dataqna_v1alpha.services.auto_suggestion_service.client import (
AutoSuggestionServiceClient,
)
from google.cloud.dataqna_v1alpha.services.question_service.async_client import (
QuestionServiceAsyncClient,
)

from google.cloud.dataqna_v1alpha.services.question_service.client import (
QuestionServiceClient,
)
from google.cloud.dataqna_v1alpha.types.annotated_string import AnnotatedString
from google.cloud.dataqna_v1alpha.types.auto_suggestion_service import Suggestion
from google.cloud.dataqna_v1alpha.types.auto_suggestion_service import SuggestionInfo
from google.cloud.dataqna_v1alpha.types.auto_suggestion_service import (
Suggestion,
SuggestionInfo,
SuggestionType,
SuggestQueriesRequest,
)
from google.cloud.dataqna_v1alpha.types.auto_suggestion_service import (
SuggestQueriesResponse,
)
from google.cloud.dataqna_v1alpha.types.auto_suggestion_service import SuggestionType
from google.cloud.dataqna_v1alpha.types.question import BigQueryJob
from google.cloud.dataqna_v1alpha.types.question import DataQuery
from google.cloud.dataqna_v1alpha.types.question import DebugFlags
from google.cloud.dataqna_v1alpha.types.question import ExecutionInfo
from google.cloud.dataqna_v1alpha.types.question import HumanReadable
from google.cloud.dataqna_v1alpha.types.question import Interpretation
from google.cloud.dataqna_v1alpha.types.question import InterpretationStructure
from google.cloud.dataqna_v1alpha.types.question import InterpretError
from google.cloud.dataqna_v1alpha.types.question import Question
from google.cloud.dataqna_v1alpha.types.question import InterpretEntity
from google.cloud.dataqna_v1alpha.types.question_service import CreateQuestionRequest
from google.cloud.dataqna_v1alpha.types.question_service import ExecuteQuestionRequest
from google.cloud.dataqna_v1alpha.types.question_service import GetQuestionRequest
from google.cloud.dataqna_v1alpha.types.question_service import GetUserFeedbackRequest
from google.cloud.dataqna_v1alpha.types.question import (
BigQueryJob,
DataQuery,
DebugFlags,
ExecutionInfo,
HumanReadable,
Interpretation,
InterpretationStructure,
InterpretEntity,
InterpretError,
Question,
)
from google.cloud.dataqna_v1alpha.types.question_service import (
CreateQuestionRequest,
ExecuteQuestionRequest,
GetQuestionRequest,
GetUserFeedbackRequest,
UpdateUserFeedbackRequest,
)
from google.cloud.dataqna_v1alpha.types.user_feedback import UserFeedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,38 @@
# limitations under the License.
#

from .services.auto_suggestion_service import AutoSuggestionServiceClient
from .services.auto_suggestion_service import AutoSuggestionServiceAsyncClient
from .services.question_service import QuestionServiceClient
from .services.question_service import QuestionServiceAsyncClient

from .services.auto_suggestion_service import (
AutoSuggestionServiceAsyncClient,
AutoSuggestionServiceClient,
)
from .services.question_service import QuestionServiceAsyncClient, QuestionServiceClient
from .types.annotated_string import AnnotatedString
from .types.auto_suggestion_service import Suggestion
from .types.auto_suggestion_service import SuggestionInfo
from .types.auto_suggestion_service import SuggestQueriesRequest
from .types.auto_suggestion_service import SuggestQueriesResponse
from .types.auto_suggestion_service import SuggestionType
from .types.question import BigQueryJob
from .types.question import DataQuery
from .types.question import DebugFlags
from .types.question import ExecutionInfo
from .types.question import HumanReadable
from .types.question import Interpretation
from .types.question import InterpretationStructure
from .types.question import InterpretError
from .types.question import Question
from .types.question import InterpretEntity
from .types.question_service import CreateQuestionRequest
from .types.question_service import ExecuteQuestionRequest
from .types.question_service import GetQuestionRequest
from .types.question_service import GetUserFeedbackRequest
from .types.question_service import UpdateUserFeedbackRequest
from .types.auto_suggestion_service import (
Suggestion,
SuggestionInfo,
SuggestionType,
SuggestQueriesRequest,
SuggestQueriesResponse,
)
from .types.question import (
BigQueryJob,
DataQuery,
DebugFlags,
ExecutionInfo,
HumanReadable,
Interpretation,
InterpretationStructure,
InterpretEntity,
InterpretError,
Question,
)
from .types.question_service import (
CreateQuestionRequest,
ExecuteQuestionRequest,
GetQuestionRequest,
GetUserFeedbackRequest,
UpdateUserFeedbackRequest,
)
from .types.user_feedback import UserFeedback

__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 AutoSuggestionServiceClient
from .async_client import AutoSuggestionServiceAsyncClient
from .client import AutoSuggestionServiceClient

__all__ = (
"AutoSuggestionServiceClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,25 @@
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.cloud.dataqna_v1alpha.types import auto_suggestion_service
from .transports.base import AutoSuggestionServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import AutoSuggestionServiceGrpcAsyncIOTransport

from .client import AutoSuggestionServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, AutoSuggestionServiceTransport
from .transports.grpc_asyncio import AutoSuggestionServiceGrpcAsyncIOTransport


class AutoSuggestionServiceAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,26 @@
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.cloud.dataqna_v1alpha.types import auto_suggestion_service
from .transports.base import AutoSuggestionServiceTransport, DEFAULT_CLIENT_INFO

from .transports.base import DEFAULT_CLIENT_INFO, AutoSuggestionServiceTransport
from .transports.grpc import AutoSuggestionServiceGrpcTransport
from .transports.grpc_asyncio import AutoSuggestionServiceGrpcAsyncIOTransport

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


# Compile a registry of transports.
_transport_registry = (
OrderedDict()
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.dataqna_v1alpha.types import auto_suggestion_service

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.dataqna_v1alpha.types import auto_suggestion_service
from .base import AutoSuggestionServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, AutoSuggestionServiceTransport


class AutoSuggestionServiceGrpcTransport(AutoSuggestionServiceTransport):
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.dataqna_v1alpha.types import auto_suggestion_service
from .base import AutoSuggestionServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, AutoSuggestionServiceTransport
from .grpc import AutoSuggestionServiceGrpcTransport


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 QuestionServiceClient
from .async_client import QuestionServiceAsyncClient
from .client import QuestionServiceClient

__all__ = (
"QuestionServiceClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,33 @@
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.protobuf import any_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

from google.cloud.dataqna_v1alpha.types import user_feedback as gcd_user_feedback
from google.cloud.dataqna_v1alpha.types import question
from google.cloud.dataqna_v1alpha.types import question as gcd_question
from google.cloud.dataqna_v1alpha.types import question_service
from google.cloud.dataqna_v1alpha.types import user_feedback
from google.cloud.dataqna_v1alpha.types import user_feedback as gcd_user_feedback
from google.protobuf import any_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import QuestionServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import QuestionServiceGrpcAsyncIOTransport

from .client import QuestionServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, QuestionServiceTransport
from .transports.grpc_asyncio import QuestionServiceGrpcAsyncIOTransport


class QuestionServiceAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,34 @@
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.protobuf import any_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

from google.cloud.dataqna_v1alpha.types import user_feedback as gcd_user_feedback
from google.cloud.dataqna_v1alpha.types import question
from google.cloud.dataqna_v1alpha.types import question as gcd_question
from google.cloud.dataqna_v1alpha.types import question_service
from google.cloud.dataqna_v1alpha.types import user_feedback
from google.cloud.dataqna_v1alpha.types import user_feedback as gcd_user_feedback
from google.protobuf import any_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import QuestionServiceTransport, DEFAULT_CLIENT_INFO

from .transports.base import DEFAULT_CLIENT_INFO, QuestionServiceTransport
from .transports.grpc import QuestionServiceGrpcTransport
from .transports.grpc_asyncio import QuestionServiceGrpcAsyncIOTransport

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


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

0 comments on commit d7e8130

Please sign in to comment.