Skip to content

Commit 0822881

Browse files
chore(internal): bump pyright (#318)
1 parent d9c014d commit 0822881

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

requirements-dev.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pydantic==2.4.2
6363
# via finch-api
6464
pydantic-core==2.10.1
6565
# via pydantic
66-
pyright==1.1.351
66+
pyright==1.1.353
6767
pytest==7.1.1
6868
# via pytest-asyncio
6969
pytest-asyncio==0.21.1

src/finch/_legacy_response.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, LegacyAPIRespon
315315

316316
@functools.wraps(func)
317317
def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]:
318-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
318+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
319319
extra_headers[RAW_RESPONSE_HEADER] = "true"
320320

321321
kwargs["extra_headers"] = extra_headers
@@ -332,7 +332,7 @@ def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P
332332

333333
@functools.wraps(func)
334334
async def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]:
335-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
335+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
336336
extra_headers[RAW_RESPONSE_HEADER] = "true"
337337

338338
kwargs["extra_headers"] = extra_headers

src/finch/_response.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def to_streamed_response_wrapper(func: Callable[P, R]) -> Callable[P, ResponseCo
634634

635635
@functools.wraps(func)
636636
def wrapped(*args: P.args, **kwargs: P.kwargs) -> ResponseContextManager[APIResponse[R]]:
637-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
637+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
638638
extra_headers[RAW_RESPONSE_HEADER] = "stream"
639639

640640
kwargs["extra_headers"] = extra_headers
@@ -655,7 +655,7 @@ def async_to_streamed_response_wrapper(
655655

656656
@functools.wraps(func)
657657
def wrapped(*args: P.args, **kwargs: P.kwargs) -> AsyncResponseContextManager[AsyncAPIResponse[R]]:
658-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
658+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
659659
extra_headers[RAW_RESPONSE_HEADER] = "stream"
660660

661661
kwargs["extra_headers"] = extra_headers
@@ -679,7 +679,7 @@ def to_custom_streamed_response_wrapper(
679679

680680
@functools.wraps(func)
681681
def wrapped(*args: P.args, **kwargs: P.kwargs) -> ResponseContextManager[_APIResponseT]:
682-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
682+
extra_headers: dict[str, Any] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
683683
extra_headers[RAW_RESPONSE_HEADER] = "stream"
684684
extra_headers[OVERRIDE_CAST_TO_HEADER] = response_cls
685685

@@ -704,7 +704,7 @@ def async_to_custom_streamed_response_wrapper(
704704

705705
@functools.wraps(func)
706706
def wrapped(*args: P.args, **kwargs: P.kwargs) -> AsyncResponseContextManager[_AsyncAPIResponseT]:
707-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
707+
extra_headers: dict[str, Any] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
708708
extra_headers[RAW_RESPONSE_HEADER] = "stream"
709709
extra_headers[OVERRIDE_CAST_TO_HEADER] = response_cls
710710

@@ -724,7 +724,7 @@ def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, APIResponse[R]]
724724

725725
@functools.wraps(func)
726726
def wrapped(*args: P.args, **kwargs: P.kwargs) -> APIResponse[R]:
727-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
727+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
728728
extra_headers[RAW_RESPONSE_HEADER] = "raw"
729729

730730
kwargs["extra_headers"] = extra_headers
@@ -741,7 +741,7 @@ def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P
741741

742742
@functools.wraps(func)
743743
async def wrapped(*args: P.args, **kwargs: P.kwargs) -> AsyncAPIResponse[R]:
744-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
744+
extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
745745
extra_headers[RAW_RESPONSE_HEADER] = "raw"
746746

747747
kwargs["extra_headers"] = extra_headers
@@ -763,7 +763,7 @@ def to_custom_raw_response_wrapper(
763763

764764
@functools.wraps(func)
765765
def wrapped(*args: P.args, **kwargs: P.kwargs) -> _APIResponseT:
766-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
766+
extra_headers: dict[str, Any] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
767767
extra_headers[RAW_RESPONSE_HEADER] = "raw"
768768
extra_headers[OVERRIDE_CAST_TO_HEADER] = response_cls
769769

@@ -786,7 +786,7 @@ def async_to_custom_raw_response_wrapper(
786786

787787
@functools.wraps(func)
788788
def wrapped(*args: P.args, **kwargs: P.kwargs) -> Awaitable[_AsyncAPIResponseT]:
789-
extra_headers = {**(cast(Any, kwargs.get("extra_headers")) or {})}
789+
extra_headers: dict[str, Any] = {**(cast(Any, kwargs.get("extra_headers")) or {})}
790790
extra_headers[RAW_RESPONSE_HEADER] = "raw"
791791
extra_headers[OVERRIDE_CAST_TO_HEADER] = response_cls
792792

0 commit comments

Comments
 (0)