Skip to content

Commit b2bf301

Browse files
committed
review comments
1 parent 9bd6aee commit b2bf301

File tree

1 file changed

+4
-4
lines changed
  • util/opentelemetry-util-genai/src/opentelemetry/util/genai/_fsspec_upload

1 file changed

+4
-4
lines changed

util/opentelemetry-util-genai/src/opentelemetry/util/genai/_fsspec_upload/completion_hook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ class CompletionRefs:
7878
UploadData = dict[str, Callable[[], JsonEncodeable]]
7979

8080

81-
def fsspec_open(
82-
urlpath: str, mode: Literal["w"], *args: Any, **kwargs: Any
83-
) -> TextIO:
81+
def fsspec_open(urlpath: str, mode: Literal["w"]) -> TextIO:
8482
"""typed wrapper around `fsspec.open`"""
85-
return cast(TextIO, fsspec.open(urlpath, mode, *args, **kwargs)) # pyright: ignore[reportUnknownMemberType]
83+
return cast(TextIO, fsspec.open(urlpath, mode)) # pyright: ignore[reportUnknownMemberType]
8684

8785

8886
class FsspecUploadCompletionHook(CompletionHook):
@@ -181,8 +179,10 @@ def _do_upload(
181179
self, path: str, json_encodeable: Callable[[], JsonEncodeable]
182180
) -> None:
183181
if self._format == "json":
182+
# output as a single line with the json messages array
184183
message_lines = [json_encodeable()]
185184
else:
185+
# output as one line per message in the array
186186
message_lines = json_encodeable()
187187
# add an index for streaming readers of jsonl
188188
for message_idx, line in enumerate(message_lines):

0 commit comments

Comments
 (0)