Skip to content

Commit 3c2e815

Browse files
chore(internal): bump pyright (#1221)
1 parent 004bc92 commit 3c2e815

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

requirements-dev.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ argcomplete==3.1.2
1717
# via nox
1818
attrs==23.1.0
1919
# via pytest
20-
azure-core==1.30.0
20+
azure-core==1.30.1
2121
# via azure-identity
2222
azure-identity==1.15.0
2323
certifi==2023.7.22
@@ -96,7 +96,7 @@ pydantic-core==2.10.1
9696
# via pydantic
9797
pyjwt==2.8.0
9898
# via msal
99-
pyright==1.1.351
99+
pyright==1.1.353
100100
pytest==7.1.1
101101
# via pytest-asyncio
102102
pytest-asyncio==0.21.1

src/openai/_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/openai/_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)