Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
2 changes: 1 addition & 1 deletion 2 requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pydantic==2.4.2
# via lithic
pydantic-core==2.10.1
# via pydantic
pyright==1.1.351
pyright==1.1.353
pytest==7.1.1
# via pytest-asyncio
pytest-asyncio==0.21.1
Expand Down
4 changes: 2 additions & 2 deletions 4 src/lithic/_legacy_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, LegacyAPIRespon

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

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

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

kwargs["extra_headers"] = extra_headers
Expand Down
16 changes: 8 additions & 8 deletions 16 src/lithic/_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def to_streamed_response_wrapper(func: Callable[P, R]) -> Callable[P, ResponseCo

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

kwargs["extra_headers"] = extra_headers
Expand All @@ -655,7 +655,7 @@ def async_to_streamed_response_wrapper(

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

kwargs["extra_headers"] = extra_headers
Expand All @@ -679,7 +679,7 @@ def to_custom_streamed_response_wrapper(

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

Expand All @@ -704,7 +704,7 @@ def async_to_custom_streamed_response_wrapper(

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

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

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

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

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

kwargs["extra_headers"] = extra_headers
Expand All @@ -763,7 +763,7 @@ def to_custom_raw_response_wrapper(

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

Expand All @@ -786,7 +786,7 @@ def async_to_custom_raw_response_wrapper(

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

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.