Skip to content

Commit

Permalink
chore: fix ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang committed Jan 12, 2024
1 parent b490ca3 commit b0de710
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ def _finalize_response(
if (
self._is_streaming(response)
or hasattr(
# FIXME: Ideally we should not rely on a private attribute (but it may be impossible).
# The assumption here is that calling `.parse()` stores the stream object in `._parsed`
# and calling `.parse()` again will not overwrite the monkey-patched version.
# FIXME: Ideally we shouldn't rely on a private attribute (but it may be
# impossible). The assumption here is that calling `.parse()` stores the
# stream object in `._parsed` and calling `.parse()` again will not
# overwrite the monkey-patched version.
# See https://github.com/openai/openai-python/blob/f1c7d714914e3321ca2e72839fe2d132a8646e7f/src/openai/_response.py#L65 # noqa: E501
response,
"_parsed",
Expand Down
2 changes: 1 addition & 1 deletion python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ commands =
mypy: mypy --config-file {toxinidir}/mypy.ini --explicit-package-bases {posargs:src}
test: pytest {posargs:tests}
ci: ruff format . --diff --config {toxinidir}/ruff.toml
ci: ruff check . --diff --config {toxinidir}/ruff.toml
ci: ruff check . --no-fix --config {toxinidir}/ruff.toml
ci: mypy --config-file {toxinidir}/mypy.ini --explicit-package-bases src
ci: pytest tests

0 comments on commit b0de710

Please sign in to comment.