Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 55f3c23

Browse files
chore(python): add nox session to sort python imports (#200)
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>
1 parent b40edb6 commit 55f3c23

31 files changed

Lines changed: 190 additions & 192 deletions

File tree

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163
17-
# created: 2022-04-06T10:30:21.687684602Z
16+
digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416
17+
# created: 2022-04-20T23:42:53.970438194Z

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27-
import sys
2827
import os
2928
import shlex
29+
import sys
3030

3131
# If extensions (or modules to document with autodoc) are in another directory,
3232
# add these directories to sys.path here. If the directory is relative to the

google/cloud/billing/budgets/__init__.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,30 @@
1414
# limitations under the License.
1515
#
1616

17+
from google.cloud.billing.budgets_v1.services.budget_service.async_client import (
18+
BudgetServiceAsyncClient,
19+
)
1720
from google.cloud.billing.budgets_v1.services.budget_service.client import (
1821
BudgetServiceClient,
1922
)
20-
from google.cloud.billing.budgets_v1.services.budget_service.async_client import (
21-
BudgetServiceAsyncClient,
23+
from google.cloud.billing.budgets_v1.types.budget_model import (
24+
Budget,
25+
BudgetAmount,
26+
CalendarPeriod,
27+
CustomPeriod,
28+
Filter,
29+
LastPeriodAmount,
30+
NotificationsRule,
31+
ThresholdRule,
32+
)
33+
from google.cloud.billing.budgets_v1.types.budget_service import (
34+
CreateBudgetRequest,
35+
DeleteBudgetRequest,
36+
GetBudgetRequest,
37+
ListBudgetsRequest,
38+
ListBudgetsResponse,
39+
UpdateBudgetRequest,
2240
)
23-
24-
from google.cloud.billing.budgets_v1.types.budget_model import Budget
25-
from google.cloud.billing.budgets_v1.types.budget_model import BudgetAmount
26-
from google.cloud.billing.budgets_v1.types.budget_model import CustomPeriod
27-
from google.cloud.billing.budgets_v1.types.budget_model import Filter
28-
from google.cloud.billing.budgets_v1.types.budget_model import LastPeriodAmount
29-
from google.cloud.billing.budgets_v1.types.budget_model import NotificationsRule
30-
from google.cloud.billing.budgets_v1.types.budget_model import ThresholdRule
31-
from google.cloud.billing.budgets_v1.types.budget_model import CalendarPeriod
32-
from google.cloud.billing.budgets_v1.types.budget_service import CreateBudgetRequest
33-
from google.cloud.billing.budgets_v1.types.budget_service import DeleteBudgetRequest
34-
from google.cloud.billing.budgets_v1.types.budget_service import GetBudgetRequest
35-
from google.cloud.billing.budgets_v1.types.budget_service import ListBudgetsRequest
36-
from google.cloud.billing.budgets_v1.types.budget_service import ListBudgetsResponse
37-
from google.cloud.billing.budgets_v1.types.budget_service import UpdateBudgetRequest
3841

3942
__all__ = (
4043
"BudgetServiceClient",

google/cloud/billing/budgets_v1/__init__.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616

17-
from .services.budget_service import BudgetServiceClient
18-
from .services.budget_service import BudgetServiceAsyncClient
19-
20-
from .types.budget_model import Budget
21-
from .types.budget_model import BudgetAmount
22-
from .types.budget_model import CustomPeriod
23-
from .types.budget_model import Filter
24-
from .types.budget_model import LastPeriodAmount
25-
from .types.budget_model import NotificationsRule
26-
from .types.budget_model import ThresholdRule
27-
from .types.budget_model import CalendarPeriod
28-
from .types.budget_service import CreateBudgetRequest
29-
from .types.budget_service import DeleteBudgetRequest
30-
from .types.budget_service import GetBudgetRequest
31-
from .types.budget_service import ListBudgetsRequest
32-
from .types.budget_service import ListBudgetsResponse
33-
from .types.budget_service import UpdateBudgetRequest
17+
from .services.budget_service import BudgetServiceAsyncClient, BudgetServiceClient
18+
from .types.budget_model import (
19+
Budget,
20+
BudgetAmount,
21+
CalendarPeriod,
22+
CustomPeriod,
23+
Filter,
24+
LastPeriodAmount,
25+
NotificationsRule,
26+
ThresholdRule,
27+
)
28+
from .types.budget_service import (
29+
CreateBudgetRequest,
30+
DeleteBudgetRequest,
31+
GetBudgetRequest,
32+
ListBudgetsRequest,
33+
ListBudgetsResponse,
34+
UpdateBudgetRequest,
35+
)
3436

3537
__all__ = (
3638
"BudgetServiceAsyncClient",

google/cloud/billing/budgets_v1/services/budget_service/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .client import BudgetServiceClient
1716
from .async_client import BudgetServiceAsyncClient
17+
from .client import BudgetServiceClient
1818

1919
__all__ = (
2020
"BudgetServiceClient",

google/cloud/billing/budgets_v1/services/budget_service/async_client.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,28 @@
1717
import functools
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120

22-
from google.api_core.client_options import ClientOptions
2321
from google.api_core import exceptions as core_exceptions
2422
from google.api_core import gapic_v1
2523
from google.api_core import retry as retries
24+
from google.api_core.client_options import ClientOptions
2625
from google.auth import credentials as ga_credentials # type: ignore
2726
from google.oauth2 import service_account # type: ignore
27+
import pkg_resources
2828

2929
try:
3030
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
3131
except AttributeError: # pragma: NO COVER
3232
OptionalRetry = Union[retries.Retry, object] # type: ignore
3333

34-
from google.cloud.billing.budgets_v1.services.budget_service import pagers
35-
from google.cloud.billing.budgets_v1.types import budget_model
36-
from google.cloud.billing.budgets_v1.types import budget_service
3734
from google.protobuf import field_mask_pb2 # type: ignore
38-
from .transports.base import BudgetServiceTransport, DEFAULT_CLIENT_INFO
39-
from .transports.grpc_asyncio import BudgetServiceGrpcAsyncIOTransport
35+
36+
from google.cloud.billing.budgets_v1.services.budget_service import pagers
37+
from google.cloud.billing.budgets_v1.types import budget_model, budget_service
38+
4039
from .client import BudgetServiceClient
40+
from .transports.base import DEFAULT_CLIENT_INFO, BudgetServiceTransport
41+
from .transports.grpc_asyncio import BudgetServiceGrpcAsyncIOTransport
4142

4243

4344
class BudgetServiceAsyncClient:

google/cloud/billing/budgets_v1/services/budget_service/client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,29 @@
1717
import os
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120

2221
from google.api_core import client_options as client_options_lib
2322
from google.api_core import exceptions as core_exceptions
2423
from google.api_core import gapic_v1
2524
from google.api_core import retry as retries
2625
from google.auth import credentials as ga_credentials # type: ignore
26+
from google.auth.exceptions import MutualTLSChannelError # type: ignore
2727
from google.auth.transport import mtls # type: ignore
2828
from google.auth.transport.grpc import SslCredentials # type: ignore
29-
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3029
from google.oauth2 import service_account # type: ignore
30+
import pkg_resources
3131

3232
try:
3333
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
3434
except AttributeError: # pragma: NO COVER
3535
OptionalRetry = Union[retries.Retry, object] # type: ignore
3636

37-
from google.cloud.billing.budgets_v1.services.budget_service import pagers
38-
from google.cloud.billing.budgets_v1.types import budget_model
39-
from google.cloud.billing.budgets_v1.types import budget_service
4037
from google.protobuf import field_mask_pb2 # type: ignore
41-
from .transports.base import BudgetServiceTransport, DEFAULT_CLIENT_INFO
38+
39+
from google.cloud.billing.budgets_v1.services.budget_service import pagers
40+
from google.cloud.billing.budgets_v1.types import budget_model, budget_service
41+
42+
from .transports.base import DEFAULT_CLIENT_INFO, BudgetServiceTransport
4243
from .transports.grpc import BudgetServiceGrpcTransport
4344
from .transports.grpc_asyncio import BudgetServiceGrpcAsyncIOTransport
4445

google/cloud/billing/budgets_v1/services/budget_service/pagers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
AsyncIterator,
1919
Awaitable,
2020
Callable,
21+
Iterator,
22+
Optional,
2123
Sequence,
2224
Tuple,
23-
Optional,
24-
Iterator,
2525
)
2626

27-
from google.cloud.billing.budgets_v1.types import budget_model
28-
from google.cloud.billing.budgets_v1.types import budget_service
27+
from google.cloud.billing.budgets_v1.types import budget_model, budget_service
2928

3029

3130
class ListBudgetsPager:

google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from .grpc import BudgetServiceGrpcTransport
2121
from .grpc_asyncio import BudgetServiceGrpcAsyncIOTransport
2222

23-
2423
# Compile a registry of transports.
2524
_transport_registry = OrderedDict() # type: Dict[str, Type[BudgetServiceTransport]]
2625
_transport_registry["grpc"] = BudgetServiceGrpcTransport

google/cloud/billing/budgets_v1/services/budget_service/transports/base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
#
1616
import abc
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
18-
import pkg_resources
1918

20-
import google.auth # type: ignore
2119
import google.api_core
2220
from google.api_core import exceptions as core_exceptions
2321
from google.api_core import gapic_v1
2422
from google.api_core import retry as retries
23+
import google.auth # type: ignore
2524
from google.auth import credentials as ga_credentials # type: ignore
2625
from google.oauth2 import service_account # type: ignore
27-
28-
from google.cloud.billing.budgets_v1.types import budget_model
29-
from google.cloud.billing.budgets_v1.types import budget_service
3026
from google.protobuf import empty_pb2 # type: ignore
27+
import pkg_resources
28+
29+
from google.cloud.billing.budgets_v1.types import budget_model, budget_service
3130

3231
try:
3332
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(

0 commit comments

Comments
 (0)