Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Jan 10, 2025
1 parent f0edbea commit f176241
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions weave/trace/weave_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def __iter__(self) -> Iterator[T] | Iterator[R]:
return self._get_slice(slice(0, None, 1))

def __len__(self) -> int:
"""This method is included for convenience. It includes a network call, which
is typically slower than most other len() operations!"""
if not self.size_func:
raise TypeError("This iterator does not support len()")
return self.size_func()
Expand Down

0 comments on commit f176241

Please sign in to comment.