Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix ruff check #104

Merged
merged 1 commit into from
Jan 12, 2024
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
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