Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.21.11 #428

Merged
merged 5 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- next

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.21.10"
".": "0.21.11"
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.21.11 (2024-07-15)

Full Changelog: [v0.21.10...v0.21.11](https://github.com/Finch-API/finch-api-python/compare/v0.21.10...v0.21.11)

### Chores

* **ci:** also run workflows for PRs targeting `next` ([#427](https://github.com/Finch-API/finch-api-python/issues/427)) ([641b850](https://github.com/Finch-API/finch-api-python/commit/641b850a385c8e2ab0c7338b7f8d3f613fda6982))
* **internal:** minor import restructuring ([#429](https://github.com/Finch-API/finch-api-python/issues/429)) ([fa85f33](https://github.com/Finch-API/finch-api-python/commit/fa85f33344ba1a67ec7a3f99e3c93bd7e1db8824))
* **internal:** minor options / compat functions updates ([#431](https://github.com/Finch-API/finch-api-python/issues/431)) ([b74c798](https://github.com/Finch-API/finch-api-python/commit/b74c798cdefef33288ef19bc19d53f2109f372ab))


### Documentation

* **examples:** use named params more ([#430](https://github.com/Finch-API/finch-api-python/issues/430)) ([9186c5f](https://github.com/Finch-API/finch-api-python/commit/9186c5faa7cfe3809cb83a1aa51cd02a43205c95))

## 0.21.10 (2024-07-10)

Full Changelog: [v0.21.9...v0.21.10](https://github.com/Finch-API/finch-api-python/compare/v0.21.9...v0.21.10)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "finch-api"
version = "0.21.10"
version = "0.21.11"
description = "The official Python library for the Finch API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
12 changes: 6 additions & 6 deletions src/finch/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,9 @@ def __exit__(
def _prepare_options(
self,
options: FinalRequestOptions, # noqa: ARG002
) -> None:
) -> FinalRequestOptions:
"""Hook for mutating the given options"""
return None
return options

def _prepare_request(
self,
Expand Down Expand Up @@ -962,7 +962,7 @@ def _request(
input_options = model_copy(options)

cast_to = self._maybe_override_cast_to(cast_to, options)
self._prepare_options(options)
options = self._prepare_options(options)

retries = self._remaining_retries(remaining_retries, options)
request = self._build_request(options)
Expand Down Expand Up @@ -1456,9 +1456,9 @@ async def __aexit__(
async def _prepare_options(
self,
options: FinalRequestOptions, # noqa: ARG002
) -> None:
) -> FinalRequestOptions:
"""Hook for mutating the given options"""
return None
return options

async def _prepare_request(
self,
Expand Down Expand Up @@ -1543,7 +1543,7 @@ async def _request(
input_options = model_copy(options)

cast_to = self._maybe_override_cast_to(cast_to, options)
await self._prepare_options(options)
options = await self._prepare_options(options)

retries = self._remaining_retries(remaining_retries, options)
request = self._build_request(options)
Expand Down
6 changes: 3 additions & 3 deletions src/finch/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:
return model.__fields__ # type: ignore


def model_copy(model: _ModelT) -> _ModelT:
def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:
if PYDANTIC_V2:
return model.model_copy()
return model.copy() # type: ignore
return model.model_copy(deep=deep)
return model.copy(deep=deep) # type: ignore


def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
Expand Down
2 changes: 1 addition & 1 deletion src/finch/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "finch"
__version__ = "0.21.10" # x-release-please-version
__version__ = "0.21.11" # x-release-please-version
4 changes: 1 addition & 3 deletions src/finch/resources/access_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from .._base_client import (
make_request_options,
)
from .._base_client import make_request_options
from ..types.create_access_token_response import CreateAccessTokenResponse

__all__ = ["AccessTokens", "AsyncAccessTokens"]
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from .._base_client import (
make_request_options,
)
from .._base_client import make_request_options
from ..types.introspection import Introspection
from ..types.disconnect_response import DisconnectResponse

Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/benefits/benefits.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
from ....types.hris import BenefitType, BenefitFrequency, benefit_create_params, benefit_update_params
from ...._base_client import (
AsyncPaginator,
make_request_options,
)
from ...._base_client import AsyncPaginator, make_request_options
from ....types.hris.benefit_type import BenefitType
from ....types.hris.company_benefit import CompanyBenefit
from ....types.hris.benefit_frequency import BenefitFrequency
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/benefits/individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
from ...._base_client import (
AsyncPaginator,
make_request_options,
)
from ...._base_client import AsyncPaginator, make_request_options
from ....types.hris.benefits import (
individual_enroll_many_params,
individual_unenroll_many_params,
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/hris/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.hris.company import Company

__all__ = ["CompanyResource", "AsyncCompanyResource"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncIndividualsPage, AsyncIndividualsPage
from ...types.hris import directory_list_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hris.individual_in_directory import IndividualInDirectory

__all__ = ["Directory", "AsyncDirectory"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/employments.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncResponsesPage, AsyncResponsesPage
from ...types.hris import employment_retrieve_many_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hris.employment_data_response import EmploymentDataResponse

__all__ = ["Employments", "AsyncEmployments"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncResponsesPage, AsyncResponsesPage
from ...types.hris import individual_retrieve_many_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hris.individual_response import IndividualResponse

__all__ = ["Individuals", "AsyncIndividuals"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/pay_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncResponsesPage, AsyncResponsesPage
from ...types.hris import pay_statement_retrieve_many_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hris.pay_statement_response import PayStatementResponse

__all__ = ["PayStatements", "AsyncPayStatements"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/hris/payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncSinglePage, AsyncSinglePage
from ...types.hris import payment_list_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hris.payment import Payment

__all__ = ["Payments", "AsyncPayments"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/jobs/automated.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncPage, AsyncPage
from ...types.jobs import automated_list_params, automated_create_params
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.jobs.automated_async_job import AutomatedAsyncJob
from ...types.jobs.automated_create_response import AutomatedCreateResponse

Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/jobs/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.jobs.manual_async_job import ManualAsyncJob

__all__ = ["Manual", "AsyncManual"]
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/payroll/pay_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncSinglePage, AsyncSinglePage
from ..._base_client import (
AsyncPaginator,
make_request_options,
)
from ..._base_client import AsyncPaginator, make_request_options
from ...types.payroll import pay_group_list_params
from ...types.payroll.pay_group_list_response import PayGroupListResponse
from ...types.payroll.pay_group_retrieve_response import PayGroupRetrieveResponse
Expand Down
5 changes: 1 addition & 4 deletions src/finch/resources/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..pagination import SyncSinglePage, AsyncSinglePage
from .._base_client import (
AsyncPaginator,
make_request_options,
)
from .._base_client import AsyncPaginator, make_request_options
from ..types.provider import Provider

__all__ = ["Providers", "AsyncProviders"]
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/request_forwarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from .._base_client import (
make_request_options,
)
from .._base_client import make_request_options
from ..types.request_forwarding_forward_response import RequestForwardingForwardResponse

__all__ = ["RequestForwarding", "AsyncRequestForwarding"]
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.sandbox import company_update_params
from ...types.location_param import LocationParam
from ...types.sandbox.company_update_response import CompanyUpdateResponse
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/connections/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...._base_client import (
make_request_options,
)
from ...._base_client import make_request_options
from ....types.sandbox.connections import account_create_params, account_update_params
from ....types.shared.connection_status_type import ConnectionStatusType
from ....types.sandbox.connections.account_create_response import AccountCreateResponse
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/connections/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...._base_client import (
make_request_options,
)
from ...._base_client import make_request_options
from ....types.sandbox import connection_create_params
from ....types.sandbox.connection_create_response import ConnectionCreateResponse

Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.sandbox import directory_create_params
from ...types.sandbox.directory_create_response import DirectoryCreateResponse

Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/employment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.sandbox import employment_update_params
from ...types.income_param import IncomeParam
from ...types.location_param import LocationParam
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.sandbox import individual_update_params
from ...types.location_param import LocationParam
from ...types.sandbox.individual_update_response import IndividualUpdateResponse
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/jobs/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...._base_client import (
make_request_options,
)
from ...._base_client import make_request_options
from ....types.sandbox.jobs import configuration_update_params
from ....types.sandbox.jobs.sandbox_job_configuration import SandboxJobConfiguration
from ....types.sandbox.jobs.configuration_retrieve_response import ConfigurationRetrieveResponse
Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/jobs/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
ConfigurationWithStreamingResponse,
AsyncConfigurationWithStreamingResponse,
)
from ...._base_client import (
make_request_options,
)
from ...._base_client import make_request_options
from ....types.sandbox import job_create_params
from ....types.sandbox.job_create_response import JobCreateResponse

Expand Down
4 changes: 1 addition & 3 deletions src/finch/resources/sandbox/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import (
make_request_options,
)
from ..._base_client import make_request_options
from ...types.sandbox import payment_create_params
from ...types.sandbox.payment_create_response import PaymentCreateResponse

Expand Down
Loading