Skip to content
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
6 changes: 3 additions & 3 deletions src/apify_client/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _injects_client_details_to_log_context(fun: Callable) -> Callable:

@functools.wraps(fun)
async def async_wrapper(resource_client: _BaseClient, *args: Any, **kwargs: Any) -> Any:
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
log_context.client_method.set(fun.__qualname__) # ty: ignore[missing-attribute]
log_context.resource_id.set(resource_client._resource_id) # noqa: SLF001

return await fun(resource_client, *args, **kwargs)
Expand All @@ -159,7 +159,7 @@ async def async_wrapper(resource_client: _BaseClient, *args: Any, **kwargs: Any)

@functools.wraps(fun)
async def async_generator_wrapper(resource_client: _BaseClient, *args: Any, **kwargs: Any) -> Any:
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
log_context.client_method.set(fun.__qualname__) # ty: ignore[missing-attribute]
log_context.resource_id.set(resource_client._resource_id) # noqa: SLF001

async for item in fun(resource_client, *args, **kwargs):
Expand All @@ -169,7 +169,7 @@ async def async_generator_wrapper(resource_client: _BaseClient, *args: Any, **kw

@functools.wraps(fun)
def wrapper(resource_client: _BaseClient, *args: Any, **kwargs: Any) -> Any:
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
log_context.client_method.set(fun.__qualname__) # ty: ignore[missing-attribute]
log_context.resource_id.set(resource_client._resource_id) # noqa: SLF001

return fun(resource_client, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_pluggable_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def test_transport_without_follow_redirects_refuses_unfollowed_requests() -> Non

class LegacyHttpClient(HttpClient):
# The signature `send_request` had before it took `follow_redirects`.
def send_request( # ty: ignore[invalid-method-override]
def send_request( # ty: ignore[incompatible-method-override]
self,
*,
method: str,
Expand Down
Loading
Loading