Skip to content

Commit 424dbc2

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat: OpenAPI spec update via Stainless API (#98)
1 parent 47a3df5 commit 424dbc2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
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 cloudflare
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/cloudflare/_response.py

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

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

638638
kwargs["extra_headers"] = extra_headers
@@ -653,7 +653,7 @@ def async_to_streamed_response_wrapper(
653653

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

659659
kwargs["extra_headers"] = extra_headers
@@ -677,7 +677,7 @@ def to_custom_streamed_response_wrapper(
677677

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

@@ -702,7 +702,7 @@ def async_to_custom_streamed_response_wrapper(
702702

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

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

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

728728
kwargs["extra_headers"] = extra_headers
@@ -739,7 +739,7 @@ def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P
739739

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

745745
kwargs["extra_headers"] = extra_headers
@@ -761,7 +761,7 @@ def to_custom_raw_response_wrapper(
761761

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

@@ -784,7 +784,7 @@ def async_to_custom_raw_response_wrapper(
784784

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

0 commit comments

Comments
 (0)