Skip to content

Commit d671c20

Browse files
author
Andrei Bratu
committed
fix linting issues
1 parent a942ed8 commit d671c20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/humanloop/overload.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,26 +203,26 @@ def overload_client(
203203
"""Overloads client methods to add tracing, local file handling, and evaluation context."""
204204
# Store original log method as _log for all clients. Used in flow decorator
205205
if hasattr(client, "log") and not hasattr(client, "_log"):
206-
client._log = client.log # type: ignore[attr-defined]
206+
client._log = client.log # type: ignore[attr-defined, union]
207207

208208
# Create a closure to capture sync_client and use_local_files
209209
def log_wrapper(self: Any, **kwargs) -> LogResponseType:
210210
return _overload_log(self, sync_client, use_local_files, **kwargs)
211211

212-
client.log = types.MethodType(log_wrapper, client)
212+
client.log = types.MethodType(log_wrapper, client) # type: ignore[assignment]
213213

214214
# Overload call method for Prompt and Agent clients
215215
if _get_file_type_from_client(client) in ["prompt", "agent"]:
216216
if sync_client is None and use_local_files:
217217
logger.error("sync_client is None but client has call method and use_local_files=%s", use_local_files)
218218
raise HumanloopRuntimeError("sync_client is required for clients that support call operations")
219219
if hasattr(client, "call") and not hasattr(client, "_call"):
220-
client._call = client.call # type: ignore[attr-defined]
220+
client._call = client.call # type: ignore[attr-defined, union-attr]
221221

222222
# Create a closure to capture sync_client and use_local_files
223223
def call_wrapper(self: Any, **kwargs) -> CallResponseType:
224224
return _overload_call(self, sync_client, use_local_files, **kwargs)
225225

226-
client.call = types.MethodType(call_wrapper, client)
226+
client.call = types.MethodType(call_wrapper, client) # type: ignore[assignment]
227227

228228
return client

0 commit comments

Comments
 (0)