From 145ea81d78114f9cabc0248c654eaa175c307122 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 7 Dec 2023 14:54:58 +0000 Subject: [PATCH] chore(internal): reformat imports --- pyproject.toml | 37 +++++---- requirements-dev.lock | 3 +- src/orb/_client.py | 15 +--- src/orb/_compat.py | 30 ++++---- src/orb/_models.py | 14 +++- src/orb/_types.py | 9 ++- src/orb/_utils/__init__.py | 76 +++++++++---------- src/orb/_utils/_utils.py | 4 +- src/orb/resources/__init__.py | 56 ++++++++++++-- src/orb/resources/coupons/__init__.py | 7 +- src/orb/resources/coupons/coupons.py | 13 +--- src/orb/resources/coupons/subscriptions.py | 13 +--- src/orb/resources/credit_notes.py | 13 +--- src/orb/resources/customers/__init__.py | 14 +++- .../customers/balance_transactions.py | 13 +--- src/orb/resources/customers/costs.py | 12 +-- .../resources/customers/credits/__init__.py | 14 +++- .../resources/customers/credits/credits.py | 18 ++--- src/orb/resources/customers/credits/ledger.py | 13 +--- src/orb/resources/customers/customers.py | 19 ++--- src/orb/resources/customers/usage.py | 12 +-- src/orb/resources/events/__init__.py | 14 +++- src/orb/resources/events/backfills.py | 13 +--- src/orb/resources/events/events.py | 19 ++--- src/orb/resources/invoice_line_items.py | 17 +---- src/orb/resources/invoices.py | 13 +--- src/orb/resources/items.py | 13 +--- src/orb/resources/metrics.py | 13 +--- src/orb/resources/plans/external_plan_id.py | 12 +-- src/orb/resources/plans/plans.py | 13 +--- src/orb/resources/prices/__init__.py | 7 +- src/orb/resources/prices/external_price_id.py | 12 +-- src/orb/resources/prices/prices.py | 13 +--- src/orb/resources/subscriptions.py | 13 +--- src/orb/resources/top_level.py | 12 +-- src/orb/types/__init__.py | 56 ++++++++++---- src/orb/types/customers/__init__.py | 40 +++++++--- src/orb/types/customers/credits/__init__.py | 16 +++- src/orb/types/plans/__init__.py | 4 +- tests/api_resources/customers/test_costs.py | 5 +- tests/api_resources/customers/test_credits.py | 5 +- tests/api_resources/customers/test_usage.py | 5 +- tests/api_resources/test_customers.py | 4 +- tests/api_resources/test_invoices.py | 5 +- tests/api_resources/test_metrics.py | 6 +- tests/utils.py | 7 +- 46 files changed, 344 insertions(+), 398 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7c5bf1a5..8c064d1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,16 +46,16 @@ Repository = "https://github.com/orbcorp/orb-python" [tool.rye] managed = true dev-dependencies = [ - # version pins are in requirements-dev.lock - "pyright", - "mypy", - "black", - "respx", - "pytest", - "pytest-asyncio", - "ruff", - "time-machine", - "nox", + "pyright==1.1.332", + "mypy==1.7.1", + "black==23.3.0", + "respx==0.20.2", + "pytest==7.1.1", + "pytest-asyncio==0.21.1", + "ruff==0.0.282", + "isort==5.10.1", + "time-machine==2.9.0", + "nox==2023.4.22", "dirty-equals>=0.6.0", ] @@ -65,10 +65,12 @@ format = { chain = [ "format:black", "format:docs", "format:ruff", + "format:isort", ]} "format:black" = "black ." "format:docs" = "python bin/blacken-docs.py README.md api.md" "format:ruff" = "ruff --fix ." +"format:isort" = "isort ." "check:ruff" = "ruff ." @@ -123,13 +125,16 @@ reportImplicitOverride = true reportImportCycles = false reportPrivateUsage = false +[tool.isort] +profile = "black" +length_sort = true +extra_standard_library = ["typing_extensions"] + [tool.ruff] line-length = 120 -output-format = "grouped" +format = "grouped" target-version = "py37" select = [ - # isort - "I", # remove unused imports "F401", # bare except statements @@ -147,12 +152,6 @@ unfixable = [ ] ignore-init-module-imports = true -[tool.ruff.lint.isort] -length-sort = true -length-sort-straight = true -combine-as-imports = true -extra-standard-library = ["typing_extensions"] -known-first-party = ["orb", "tests"] [tool.ruff.per-file-ignores] "bin/**.py" = ["T201", "T203"] diff --git a/requirements-dev.lock b/requirements-dev.lock index 36843262..ce154682 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -25,6 +25,7 @@ httpcore==1.0.2 httpx==0.25.2 idna==3.4 iniconfig==2.0.0 +isort==5.10.1 mypy==1.7.1 mypy-extensions==1.0.0 nodeenv==1.8.0 @@ -42,7 +43,7 @@ pytest-asyncio==0.21.1 python-dateutil==2.8.2 pytz==2023.3.post1 respx==0.20.2 -ruff==0.1.7 +ruff==0.0.282 six==1.16.0 sniffio==1.3.0 time-machine==2.9.0 diff --git a/src/orb/_client.py b/src/orb/_client.py index 874a7d48..daad95da 100644 --- a/src/orb/_client.py +++ b/src/orb/_client.py @@ -20,19 +20,12 @@ ProxiesTypes, RequestOptions, ) -from ._utils import ( - is_given, - is_mapping, - get_async_library, -) +from ._utils import is_given, is_mapping, get_async_library from ._version import __version__ -from ._streaming import Stream as Stream, AsyncStream as AsyncStream +from ._streaming import Stream as Stream +from ._streaming import AsyncStream as AsyncStream from ._exceptions import OrbError, APIStatusError -from ._base_client import ( - DEFAULT_MAX_RETRIES, - SyncAPIClient, - AsyncAPIClient, -) +from ._base_client import DEFAULT_MAX_RETRIES, SyncAPIClient, AsyncAPIClient __all__ = [ "Timeout", diff --git a/src/orb/_compat.py b/src/orb/_compat.py index d95db8ed..34323c9b 100644 --- a/src/orb/_compat.py +++ b/src/orb/_compat.py @@ -43,23 +43,21 @@ def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001 else: if PYDANTIC_V2: - from pydantic.v1.typing import ( - get_args as get_args, - is_union as is_union, - get_origin as get_origin, - is_typeddict as is_typeddict, - is_literal_type as is_literal_type, - ) - from pydantic.v1.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime + from pydantic.v1.typing import get_args as get_args + from pydantic.v1.typing import is_union as is_union + from pydantic.v1.typing import get_origin as get_origin + from pydantic.v1.typing import is_typeddict as is_typeddict + from pydantic.v1.typing import is_literal_type as is_literal_type + from pydantic.v1.datetime_parse import parse_date as parse_date + from pydantic.v1.datetime_parse import parse_datetime as parse_datetime else: - from pydantic.typing import ( - get_args as get_args, - is_union as is_union, - get_origin as get_origin, - is_typeddict as is_typeddict, - is_literal_type as is_literal_type, - ) - from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime + from pydantic.typing import get_args as get_args + from pydantic.typing import is_union as is_union + from pydantic.typing import get_origin as get_origin + from pydantic.typing import is_typeddict as is_typeddict + from pydantic.typing import is_literal_type as is_literal_type + from pydantic.datetime_parse import parse_date as parse_date + from pydantic.datetime_parse import parse_datetime as parse_datetime # refactored config diff --git a/src/orb/_models.py b/src/orb/_models.py index cdd44ccb..5b8c9601 100644 --- a/src/orb/_models.py +++ b/src/orb/_models.py @@ -30,11 +30,17 @@ AnyMapping, HttpxRequestFiles, ) -from ._utils import is_list, is_given, is_mapping, parse_date, parse_datetime, strip_not_given +from ._utils import ( + is_list, + is_given, + is_mapping, + parse_date, + parse_datetime, + strip_not_given, +) +from ._compat import PYDANTIC_V2, ConfigDict +from ._compat import GenericModel as BaseGenericModel from ._compat import ( - PYDANTIC_V2, - ConfigDict, - GenericModel as BaseGenericModel, get_args, is_union, parse_obj, diff --git a/src/orb/_types.py b/src/orb/_types.py index 221b815f..bcc7a427 100644 --- a/src/orb/_types.py +++ b/src/orb/_types.py @@ -19,7 +19,14 @@ Sequence, AsyncIterator, ) -from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable +from typing_extensions import ( + Literal, + Protocol, + TypeAlias, + TypedDict, + override, + runtime_checkable, +) import pydantic from httpx import URL, Proxy, Timeout, Response, BaseTransport, AsyncBaseTransport diff --git a/src/orb/_utils/__init__.py b/src/orb/_utils/__init__.py index e98636c9..400ca9b8 100644 --- a/src/orb/_utils/__init__.py +++ b/src/orb/_utils/__init__.py @@ -1,41 +1,37 @@ from ._proxy import LazyProxy as LazyProxy -from ._utils import ( - flatten as flatten, - is_dict as is_dict, - is_list as is_list, - is_given as is_given, - is_tuple as is_tuple, - is_mapping as is_mapping, - is_tuple_t as is_tuple_t, - parse_date as parse_date, - is_sequence as is_sequence, - coerce_float as coerce_float, - is_list_type as is_list_type, - is_mapping_t as is_mapping_t, - removeprefix as removeprefix, - removesuffix as removesuffix, - extract_files as extract_files, - is_sequence_t as is_sequence_t, - is_union_type as is_union_type, - required_args as required_args, - coerce_boolean as coerce_boolean, - coerce_integer as coerce_integer, - file_from_path as file_from_path, - parse_datetime as parse_datetime, - strip_not_given as strip_not_given, - deepcopy_minimal as deepcopy_minimal, - extract_type_arg as extract_type_arg, - is_required_type as is_required_type, - get_async_library as get_async_library, - is_annotated_type as is_annotated_type, - maybe_coerce_float as maybe_coerce_float, - get_required_header as get_required_header, - maybe_coerce_boolean as maybe_coerce_boolean, - maybe_coerce_integer as maybe_coerce_integer, - strip_annotated_type as strip_annotated_type, -) -from ._transform import ( - PropertyInfo as PropertyInfo, - transform as transform, - maybe_transform as maybe_transform, -) +from ._utils import flatten as flatten +from ._utils import is_dict as is_dict +from ._utils import is_list as is_list +from ._utils import is_given as is_given +from ._utils import is_tuple as is_tuple +from ._utils import is_mapping as is_mapping +from ._utils import is_tuple_t as is_tuple_t +from ._utils import parse_date as parse_date +from ._utils import is_sequence as is_sequence +from ._utils import coerce_float as coerce_float +from ._utils import is_list_type as is_list_type +from ._utils import is_mapping_t as is_mapping_t +from ._utils import removeprefix as removeprefix +from ._utils import removesuffix as removesuffix +from ._utils import extract_files as extract_files +from ._utils import is_sequence_t as is_sequence_t +from ._utils import is_union_type as is_union_type +from ._utils import required_args as required_args +from ._utils import coerce_boolean as coerce_boolean +from ._utils import coerce_integer as coerce_integer +from ._utils import file_from_path as file_from_path +from ._utils import parse_datetime as parse_datetime +from ._utils import strip_not_given as strip_not_given +from ._utils import deepcopy_minimal as deepcopy_minimal +from ._utils import extract_type_arg as extract_type_arg +from ._utils import is_required_type as is_required_type +from ._utils import get_async_library as get_async_library +from ._utils import is_annotated_type as is_annotated_type +from ._utils import maybe_coerce_float as maybe_coerce_float +from ._utils import get_required_header as get_required_header +from ._utils import maybe_coerce_boolean as maybe_coerce_boolean +from ._utils import maybe_coerce_integer as maybe_coerce_integer +from ._utils import strip_annotated_type as strip_annotated_type +from ._transform import PropertyInfo as PropertyInfo +from ._transform import transform as transform +from ._transform import maybe_transform as maybe_transform diff --git a/src/orb/_utils/_utils.py b/src/orb/_utils/_utils.py index cce69238..83f88cc3 100644 --- a/src/orb/_utils/_utils.py +++ b/src/orb/_utils/_utils.py @@ -21,7 +21,9 @@ import sniffio from .._types import Headers, NotGiven, FileTypes, NotGivenOr, HeadersLike -from .._compat import is_union as _is_union, parse_date as parse_date, parse_datetime as parse_datetime +from .._compat import is_union as _is_union +from .._compat import parse_date as parse_date +from .._compat import parse_datetime as parse_datetime _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) diff --git a/src/orb/resources/__init__.py b/src/orb/resources/__init__.py index 8aed680b..2568c92b 100644 --- a/src/orb/resources/__init__.py +++ b/src/orb/resources/__init__.py @@ -2,14 +2,54 @@ from .items import Items, AsyncItems, ItemsWithRawResponse, AsyncItemsWithRawResponse from .plans import Plans, AsyncPlans, PlansWithRawResponse, AsyncPlansWithRawResponse -from .events import Events, AsyncEvents, EventsWithRawResponse, AsyncEventsWithRawResponse -from .prices import Prices, AsyncPrices, PricesWithRawResponse, AsyncPricesWithRawResponse -from .coupons import Coupons, AsyncCoupons, CouponsWithRawResponse, AsyncCouponsWithRawResponse -from .metrics import Metrics, AsyncMetrics, MetricsWithRawResponse, AsyncMetricsWithRawResponse -from .invoices import Invoices, AsyncInvoices, InvoicesWithRawResponse, AsyncInvoicesWithRawResponse -from .customers import Customers, AsyncCustomers, CustomersWithRawResponse, AsyncCustomersWithRawResponse -from .top_level import TopLevel, AsyncTopLevel, TopLevelWithRawResponse, AsyncTopLevelWithRawResponse -from .credit_notes import CreditNotes, AsyncCreditNotes, CreditNotesWithRawResponse, AsyncCreditNotesWithRawResponse +from .events import ( + Events, + AsyncEvents, + EventsWithRawResponse, + AsyncEventsWithRawResponse, +) +from .prices import ( + Prices, + AsyncPrices, + PricesWithRawResponse, + AsyncPricesWithRawResponse, +) +from .coupons import ( + Coupons, + AsyncCoupons, + CouponsWithRawResponse, + AsyncCouponsWithRawResponse, +) +from .metrics import ( + Metrics, + AsyncMetrics, + MetricsWithRawResponse, + AsyncMetricsWithRawResponse, +) +from .invoices import ( + Invoices, + AsyncInvoices, + InvoicesWithRawResponse, + AsyncInvoicesWithRawResponse, +) +from .customers import ( + Customers, + AsyncCustomers, + CustomersWithRawResponse, + AsyncCustomersWithRawResponse, +) +from .top_level import ( + TopLevel, + AsyncTopLevel, + TopLevelWithRawResponse, + AsyncTopLevelWithRawResponse, +) +from .credit_notes import ( + CreditNotes, + AsyncCreditNotes, + CreditNotesWithRawResponse, + AsyncCreditNotesWithRawResponse, +) from .subscriptions import ( Subscriptions, AsyncSubscriptions, diff --git a/src/orb/resources/coupons/__init__.py b/src/orb/resources/coupons/__init__.py index c091a7f6..401e452f 100644 --- a/src/orb/resources/coupons/__init__.py +++ b/src/orb/resources/coupons/__init__.py @@ -1,6 +1,11 @@ # File generated from our OpenAPI spec by Stainless. -from .coupons import Coupons, AsyncCoupons, CouponsWithRawResponse, AsyncCouponsWithRawResponse +from .coupons import ( + Coupons, + AsyncCoupons, + CouponsWithRawResponse, + AsyncCouponsWithRawResponse, +) from .subscriptions import ( Subscriptions, AsyncSubscriptions, diff --git a/src/orb/resources/coupons/coupons.py b/src/orb/resources/coupons/coupons.py index f24b7d3e..2f10fcfd 100644 --- a/src/orb/resources/coupons/coupons.py +++ b/src/orb/resources/coupons/coupons.py @@ -7,13 +7,7 @@ import httpx from ...types import Coupon, coupon_list_params, coupon_create_params -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper @@ -24,10 +18,7 @@ SubscriptionsWithRawResponse, AsyncSubscriptionsWithRawResponse, ) -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from ..._client import Orb, AsyncOrb diff --git a/src/orb/resources/coupons/subscriptions.py b/src/orb/resources/coupons/subscriptions.py index 3afd9ad7..ba7bd88c 100644 --- a/src/orb/resources/coupons/subscriptions.py +++ b/src/orb/resources/coupons/subscriptions.py @@ -7,21 +7,12 @@ import httpx from ...types import Subscription -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.coupons import subscription_list_params if TYPE_CHECKING: diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py index 1ee0b8e7..a8ba409f 100644 --- a/src/orb/resources/credit_notes.py +++ b/src/orb/resources/credit_notes.py @@ -7,21 +7,12 @@ import httpx from ..types import CreditNote, credit_note_list_params -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/customers/__init__.py b/src/orb/resources/customers/__init__.py index eb21342c..10929df1 100644 --- a/src/orb/resources/customers/__init__.py +++ b/src/orb/resources/customers/__init__.py @@ -2,8 +2,18 @@ from .costs import Costs, AsyncCosts, CostsWithRawResponse, AsyncCostsWithRawResponse from .usage import Usage, AsyncUsage, UsageWithRawResponse, AsyncUsageWithRawResponse -from .credits import Credits, AsyncCredits, CreditsWithRawResponse, AsyncCreditsWithRawResponse -from .customers import Customers, AsyncCustomers, CustomersWithRawResponse, AsyncCustomersWithRawResponse +from .credits import ( + Credits, + AsyncCredits, + CreditsWithRawResponse, + AsyncCreditsWithRawResponse, +) +from .customers import ( + Customers, + AsyncCustomers, + CustomersWithRawResponse, + AsyncCustomersWithRawResponse, +) from .balance_transactions import ( BalanceTransactions, AsyncBalanceTransactions, diff --git a/src/orb/resources/customers/balance_transactions.py b/src/orb/resources/customers/balance_transactions.py index 6fa9230d..70ac0833 100644 --- a/src/orb/resources/customers/balance_transactions.py +++ b/src/orb/resources/customers/balance_transactions.py @@ -8,21 +8,12 @@ import httpx -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.customers import ( BalanceTransactionListResponse, BalanceTransactionCreateResponse, diff --git a/src/orb/resources/customers/costs.py b/src/orb/resources/customers/costs.py index 9fca9df8..664b0ad3 100644 --- a/src/orb/resources/customers/costs.py +++ b/src/orb/resources/customers/costs.py @@ -8,19 +8,11 @@ import httpx -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.customers import ( CostListResponse, CostListByExternalIDResponse, diff --git a/src/orb/resources/customers/credits/__init__.py b/src/orb/resources/customers/credits/__init__.py index 910ecf9a..941518df 100644 --- a/src/orb/resources/customers/credits/__init__.py +++ b/src/orb/resources/customers/credits/__init__.py @@ -1,7 +1,17 @@ # File generated from our OpenAPI spec by Stainless. -from .ledger import Ledger, AsyncLedger, LedgerWithRawResponse, AsyncLedgerWithRawResponse -from .credits import Credits, AsyncCredits, CreditsWithRawResponse, AsyncCreditsWithRawResponse +from .ledger import ( + Ledger, + AsyncLedger, + LedgerWithRawResponse, + AsyncLedgerWithRawResponse, +) +from .credits import ( + Credits, + AsyncCredits, + CreditsWithRawResponse, + AsyncCreditsWithRawResponse, +) __all__ = [ "Ledger", diff --git a/src/orb/resources/customers/credits/credits.py b/src/orb/resources/customers/credits/credits.py index 3e3e58f2..3d94d710 100644 --- a/src/orb/resources/customers/credits/credits.py +++ b/src/orb/resources/customers/credits/credits.py @@ -6,22 +6,18 @@ import httpx -from .ledger import Ledger, AsyncLedger, LedgerWithRawResponse, AsyncLedgerWithRawResponse -from ...._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, +from .ledger import ( + Ledger, + AsyncLedger, + LedgerWithRawResponse, + AsyncLedgerWithRawResponse, ) +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ....pagination import SyncPage, AsyncPage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.customers import ( CreditListResponse, CreditListByExternalIDResponse, diff --git a/src/orb/resources/customers/credits/ledger.py b/src/orb/resources/customers/credits/ledger.py index 7b5c3221..34e87443 100644 --- a/src/orb/resources/customers/credits/ledger.py +++ b/src/orb/resources/customers/credits/ledger.py @@ -8,21 +8,12 @@ import httpx -from ...._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import required_args, maybe_transform from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ....pagination import SyncPage, AsyncPage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.customers.credits import ( LedgerListResponse, LedgerCreateEntryResponse, diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index 750051ac..c791831b 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -17,23 +17,18 @@ customer_update_params, customer_update_by_external_id_params, ) -from .credits import Credits, AsyncCredits, CreditsWithRawResponse, AsyncCreditsWithRawResponse -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NoneType, - NotGiven, +from .credits import ( + Credits, + AsyncCredits, + CreditsWithRawResponse, + AsyncCreditsWithRawResponse, ) +from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .balance_transactions import ( BalanceTransactions, AsyncBalanceTransactions, diff --git a/src/orb/resources/customers/usage.py b/src/orb/resources/customers/usage.py index 46093d4b..67ec4f8f 100644 --- a/src/orb/resources/customers/usage.py +++ b/src/orb/resources/customers/usage.py @@ -7,19 +7,11 @@ import httpx -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.customers import ( UsageUpdateResponse, UsageUpdateByExternalIDResponse, diff --git a/src/orb/resources/events/__init__.py b/src/orb/resources/events/__init__.py index 3b7f4e8e..cf869f1e 100644 --- a/src/orb/resources/events/__init__.py +++ b/src/orb/resources/events/__init__.py @@ -1,7 +1,17 @@ # File generated from our OpenAPI spec by Stainless. -from .events import Events, AsyncEvents, EventsWithRawResponse, AsyncEventsWithRawResponse -from .backfills import Backfills, AsyncBackfills, BackfillsWithRawResponse, AsyncBackfillsWithRawResponse +from .events import ( + Events, + AsyncEvents, + EventsWithRawResponse, + AsyncEventsWithRawResponse, +) +from .backfills import ( + Backfills, + AsyncBackfills, + BackfillsWithRawResponse, + AsyncBackfillsWithRawResponse, +) __all__ = [ "Backfills", diff --git a/src/orb/resources/events/backfills.py b/src/orb/resources/events/backfills.py index 9dc2d171..554f3bd1 100644 --- a/src/orb/resources/events/backfills.py +++ b/src/orb/resources/events/backfills.py @@ -7,21 +7,12 @@ import httpx -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.events import ( BackfillListResponse, BackfillCloseResponse, diff --git a/src/orb/resources/events/events.py b/src/orb/resources/events/events.py index 98ee012c..419dc81e 100644 --- a/src/orb/resources/events/events.py +++ b/src/orb/resources/events/events.py @@ -16,20 +16,17 @@ event_search_params, event_update_params, ) -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform -from .backfills import Backfills, AsyncBackfills, BackfillsWithRawResponse, AsyncBackfillsWithRawResponse +from .backfills import ( + Backfills, + AsyncBackfills, + BackfillsWithRawResponse, + AsyncBackfillsWithRawResponse, +) from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options if TYPE_CHECKING: from ..._client import Orb, AsyncOrb diff --git a/src/orb/resources/invoice_line_items.py b/src/orb/resources/invoice_line_items.py index aff533aa..3aeb08c0 100644 --- a/src/orb/resources/invoice_line_items.py +++ b/src/orb/resources/invoice_line_items.py @@ -7,23 +7,12 @@ import httpx -from ..types import ( - InvoiceLineItemCreateResponse, - invoice_line_item_create_params, -) -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..types import InvoiceLineItemCreateResponse, invoice_line_item_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py index 9298124f..be0450a6 100644 --- a/src/orb/resources/invoices.py +++ b/src/orb/resources/invoices.py @@ -16,21 +16,12 @@ invoice_mark_paid_params, invoice_fetch_upcoming_params, ) -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/items.py b/src/orb/resources/items.py index 0b4d3337..b78e34f8 100644 --- a/src/orb/resources/items.py +++ b/src/orb/resources/items.py @@ -7,21 +7,12 @@ import httpx from ..types import Item, item_list_params, item_create_params -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/metrics.py b/src/orb/resources/metrics.py index c21bca29..de994372 100644 --- a/src/orb/resources/metrics.py +++ b/src/orb/resources/metrics.py @@ -14,21 +14,12 @@ metric_list_params, metric_create_params, ) -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/plans/external_plan_id.py b/src/orb/resources/plans/external_plan_id.py index 8b2e6454..bc915b10 100644 --- a/src/orb/resources/plans/external_plan_id.py +++ b/src/orb/resources/plans/external_plan_id.py @@ -7,20 +7,12 @@ import httpx from ...types import Plan -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...types.plans import external_plan_id_update_params -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options if TYPE_CHECKING: from ..._client import Orb, AsyncOrb diff --git a/src/orb/resources/plans/plans.py b/src/orb/resources/plans/plans.py index c53abc68..2f2051da 100644 --- a/src/orb/resources/plans/plans.py +++ b/src/orb/resources/plans/plans.py @@ -9,21 +9,12 @@ import httpx from ...types import Plan, plan_list_params, plan_create_params, plan_update_params -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .external_plan_id import ( ExternalPlanID, AsyncExternalPlanID, diff --git a/src/orb/resources/prices/__init__.py b/src/orb/resources/prices/__init__.py index b201fe0e..5f6d3df0 100644 --- a/src/orb/resources/prices/__init__.py +++ b/src/orb/resources/prices/__init__.py @@ -1,6 +1,11 @@ # File generated from our OpenAPI spec by Stainless. -from .prices import Prices, AsyncPrices, PricesWithRawResponse, AsyncPricesWithRawResponse +from .prices import ( + Prices, + AsyncPrices, + PricesWithRawResponse, + AsyncPricesWithRawResponse, +) from .external_price_id import ( ExternalPriceID, AsyncExternalPriceID, diff --git a/src/orb/resources/prices/external_price_id.py b/src/orb/resources/prices/external_price_id.py index 3a2156cb..3c8455f0 100644 --- a/src/orb/resources/prices/external_price_id.py +++ b/src/orb/resources/prices/external_price_id.py @@ -7,18 +7,10 @@ import httpx from ...types import Price -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options if TYPE_CHECKING: from ..._client import Orb, AsyncOrb diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py index c0891663..72b53abb 100644 --- a/src/orb/resources/prices/prices.py +++ b/src/orb/resources/prices/prices.py @@ -8,21 +8,12 @@ import httpx from ...types import Price, price_list_params, price_create_params -from ..._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import required_args, maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .external_price_id import ( ExternalPriceID, AsyncExternalPriceID, diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 39c80fbc..530e90bc 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -25,21 +25,12 @@ subscription_update_fixed_fee_quantity_params, subscription_unschedule_fixed_fee_quantity_updates_params, ) -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/resources/top_level.py b/src/orb/resources/top_level.py index bf599134..10a2eb2d 100644 --- a/src/orb/resources/top_level.py +++ b/src/orb/resources/top_level.py @@ -7,18 +7,10 @@ import httpx from ..types import TopLevelPingResponse -from .._types import ( - NOT_GIVEN, - Body, - Query, - Headers, - NotGiven, -) +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_raw_response_wrapper, async_to_raw_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options if TYPE_CHECKING: from .._client import Orb, AsyncOrb diff --git a/src/orb/types/__init__.py b/src/orb/types/__init__.py index f811059c..a5b10d9f 100644 --- a/src/orb/types/__init__.py +++ b/src/orb/types/__init__.py @@ -43,20 +43,48 @@ from .event_deprecate_response import EventDeprecateResponse as EventDeprecateResponse from .invoice_mark_paid_params import InvoiceMarkPaidParams as InvoiceMarkPaidParams from .subscription_list_params import SubscriptionListParams as SubscriptionListParams -from .subscription_cancel_params import SubscriptionCancelParams as SubscriptionCancelParams -from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams -from .invoice_fetch_upcoming_params import InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams -from .invoice_fetch_upcoming_response import InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse -from .invoice_line_item_create_params import InvoiceLineItemCreateParams as InvoiceLineItemCreateParams -from .subscription_fetch_costs_params import SubscriptionFetchCostsParams as SubscriptionFetchCostsParams -from .subscription_fetch_usage_params import SubscriptionFetchUsageParams as SubscriptionFetchUsageParams -from .invoice_line_item_create_response import InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse -from .subscription_fetch_costs_response import SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse -from .subscription_trigger_phase_params import SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams -from .subscription_fetch_schedule_params import SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams -from .subscription_price_intervals_params import SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams -from .subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse -from .customer_update_by_external_id_params import CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams +from .subscription_cancel_params import ( + SubscriptionCancelParams as SubscriptionCancelParams, +) +from .subscription_create_params import ( + SubscriptionCreateParams as SubscriptionCreateParams, +) +from .invoice_fetch_upcoming_params import ( + InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams, +) +from .invoice_fetch_upcoming_response import ( + InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse, +) +from .invoice_line_item_create_params import ( + InvoiceLineItemCreateParams as InvoiceLineItemCreateParams, +) +from .subscription_fetch_costs_params import ( + SubscriptionFetchCostsParams as SubscriptionFetchCostsParams, +) +from .subscription_fetch_usage_params import ( + SubscriptionFetchUsageParams as SubscriptionFetchUsageParams, +) +from .invoice_line_item_create_response import ( + InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse, +) +from .subscription_fetch_costs_response import ( + SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse, +) +from .subscription_trigger_phase_params import ( + SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams, +) +from .subscription_fetch_schedule_params import ( + SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams, +) +from .subscription_price_intervals_params import ( + SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams, +) +from .subscription_fetch_schedule_response import ( + SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse, +) +from .customer_update_by_external_id_params import ( + CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams, +) from .subscription_schedule_plan_change_params import ( SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams, ) diff --git a/src/orb/types/customers/__init__.py b/src/orb/types/customers/__init__.py index c0a0f401..e4a40e36 100644 --- a/src/orb/types/customers/__init__.py +++ b/src/orb/types/customers/__init__.py @@ -8,13 +8,33 @@ from .usage_update_params import UsageUpdateParams as UsageUpdateParams from .credit_list_response import CreditListResponse as CreditListResponse from .usage_update_response import UsageUpdateResponse as UsageUpdateResponse -from .balance_transaction_list_params import BalanceTransactionListParams as BalanceTransactionListParams -from .cost_list_by_external_id_params import CostListByExternalIDParams as CostListByExternalIDParams -from .balance_transaction_create_params import BalanceTransactionCreateParams as BalanceTransactionCreateParams -from .balance_transaction_list_response import BalanceTransactionListResponse as BalanceTransactionListResponse -from .cost_list_by_external_id_response import CostListByExternalIDResponse as CostListByExternalIDResponse -from .credit_list_by_external_id_params import CreditListByExternalIDParams as CreditListByExternalIDParams -from .usage_update_by_external_id_params import UsageUpdateByExternalIDParams as UsageUpdateByExternalIDParams -from .balance_transaction_create_response import BalanceTransactionCreateResponse as BalanceTransactionCreateResponse -from .credit_list_by_external_id_response import CreditListByExternalIDResponse as CreditListByExternalIDResponse -from .usage_update_by_external_id_response import UsageUpdateByExternalIDResponse as UsageUpdateByExternalIDResponse +from .balance_transaction_list_params import ( + BalanceTransactionListParams as BalanceTransactionListParams, +) +from .cost_list_by_external_id_params import ( + CostListByExternalIDParams as CostListByExternalIDParams, +) +from .balance_transaction_create_params import ( + BalanceTransactionCreateParams as BalanceTransactionCreateParams, +) +from .balance_transaction_list_response import ( + BalanceTransactionListResponse as BalanceTransactionListResponse, +) +from .cost_list_by_external_id_response import ( + CostListByExternalIDResponse as CostListByExternalIDResponse, +) +from .credit_list_by_external_id_params import ( + CreditListByExternalIDParams as CreditListByExternalIDParams, +) +from .usage_update_by_external_id_params import ( + UsageUpdateByExternalIDParams as UsageUpdateByExternalIDParams, +) +from .balance_transaction_create_response import ( + BalanceTransactionCreateResponse as BalanceTransactionCreateResponse, +) +from .credit_list_by_external_id_response import ( + CreditListByExternalIDResponse as CreditListByExternalIDResponse, +) +from .usage_update_by_external_id_response import ( + UsageUpdateByExternalIDResponse as UsageUpdateByExternalIDResponse, +) diff --git a/src/orb/types/customers/credits/__init__.py b/src/orb/types/customers/credits/__init__.py index 47b1e617..ea073894 100644 --- a/src/orb/types/customers/credits/__init__.py +++ b/src/orb/types/customers/credits/__init__.py @@ -4,10 +4,18 @@ from .ledger_list_params import LedgerListParams as LedgerListParams from .ledger_list_response import LedgerListResponse as LedgerListResponse -from .ledger_create_entry_params import LedgerCreateEntryParams as LedgerCreateEntryParams -from .ledger_create_entry_response import LedgerCreateEntryResponse as LedgerCreateEntryResponse -from .ledger_list_by_external_id_params import LedgerListByExternalIDParams as LedgerListByExternalIDParams -from .ledger_list_by_external_id_response import LedgerListByExternalIDResponse as LedgerListByExternalIDResponse +from .ledger_create_entry_params import ( + LedgerCreateEntryParams as LedgerCreateEntryParams, +) +from .ledger_create_entry_response import ( + LedgerCreateEntryResponse as LedgerCreateEntryResponse, +) +from .ledger_list_by_external_id_params import ( + LedgerListByExternalIDParams as LedgerListByExternalIDParams, +) +from .ledger_list_by_external_id_response import ( + LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, +) from .ledger_create_entry_by_external_id_params import ( LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, ) diff --git a/src/orb/types/plans/__init__.py b/src/orb/types/plans/__init__.py index e717dfd4..2870996b 100644 --- a/src/orb/types/plans/__init__.py +++ b/src/orb/types/plans/__init__.py @@ -2,4 +2,6 @@ from __future__ import annotations -from .external_plan_id_update_params import ExternalPlanIDUpdateParams as ExternalPlanIDUpdateParams +from .external_plan_id_update_params import ( + ExternalPlanIDUpdateParams as ExternalPlanIDUpdateParams, +) diff --git a/tests/api_resources/customers/test_costs.py b/tests/api_resources/customers/test_costs.py index e2ca18f2..0d6d84bb 100644 --- a/tests/api_resources/customers/test_costs.py +++ b/tests/api_resources/customers/test_costs.py @@ -10,10 +10,7 @@ from orb._utils import parse_datetime from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type -from orb.types.customers import ( - CostListResponse, - CostListByExternalIDResponse, -) +from orb.types.customers import CostListResponse, CostListByExternalIDResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" diff --git a/tests/api_resources/customers/test_credits.py b/tests/api_resources/customers/test_credits.py index 7b7f94ad..f93c02d9 100644 --- a/tests/api_resources/customers/test_credits.py +++ b/tests/api_resources/customers/test_credits.py @@ -10,10 +10,7 @@ from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type from orb.pagination import SyncPage, AsyncPage -from orb.types.customers import ( - CreditListResponse, - CreditListByExternalIDResponse, -) +from orb.types.customers import CreditListResponse, CreditListByExternalIDResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" diff --git a/tests/api_resources/customers/test_usage.py b/tests/api_resources/customers/test_usage.py index 6ab465bc..6ef1ca28 100644 --- a/tests/api_resources/customers/test_usage.py +++ b/tests/api_resources/customers/test_usage.py @@ -10,10 +10,7 @@ from orb._utils import parse_datetime from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type -from orb.types.customers import ( - UsageUpdateResponse, - UsageUpdateByExternalIDResponse, -) +from orb.types.customers import UsageUpdateResponse, UsageUpdateByExternalIDResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index a68a69cf..b5f0e278 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -7,9 +7,7 @@ import pytest from orb import Orb, AsyncOrb -from orb.types import ( - Customer, -) +from orb.types import Customer from orb._utils import parse_datetime from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type diff --git a/tests/api_resources/test_invoices.py b/tests/api_resources/test_invoices.py index e20d1e49..3b055702 100644 --- a/tests/api_resources/test_invoices.py +++ b/tests/api_resources/test_invoices.py @@ -7,10 +7,7 @@ import pytest from orb import Orb, AsyncOrb -from orb.types import ( - Invoice, - InvoiceFetchUpcomingResponse, -) +from orb.types import Invoice, InvoiceFetchUpcomingResponse from orb._utils import parse_date, parse_datetime from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type diff --git a/tests/api_resources/test_metrics.py b/tests/api_resources/test_metrics.py index c6fb5732..2f61aba5 100644 --- a/tests/api_resources/test_metrics.py +++ b/tests/api_resources/test_metrics.py @@ -7,11 +7,7 @@ import pytest from orb import Orb, AsyncOrb -from orb.types import ( - MetricListResponse, - MetricFetchResponse, - MetricCreateResponse, -) +from orb.types import MetricListResponse, MetricFetchResponse, MetricCreateResponse from orb._utils import parse_datetime from orb._client import Orb, AsyncOrb from tests.utils import assert_matches_type diff --git a/tests/utils.py b/tests/utils.py index fbc7df39..ade38898 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -8,12 +8,7 @@ from typing_extensions import Literal, get_args, get_origin, assert_type from orb._types import NoneType -from orb._utils import ( - is_dict, - is_list, - is_list_type, - is_union_type, -) +from orb._utils import is_dict, is_list, is_list_type, is_union_type from orb._compat import PYDANTIC_V2, field_outer_type, get_model_fields from orb._models import BaseModel