You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f0db42c
Browse filesBrowse the repository at this point in the historyBrowse files
zhansheng.lzs
committed
style: satisfy pre-commit and fix a Python 3.9 test failure
The pre-commit workflow failed on `add-trailing-comma`, `black` and `pylint`,
and the 3.9 unit-test job failed on one new test.
pylint:
- `_handle_response` was at 52/50 statements. The SSE parse-failure branch it
gained was a near-copy of the one in `call()`, so both now share
`_sse_parse_failure_response`, which brings it back under the limit instead
of widening it.
- Four test modules drive private request handlers on purpose; they now carry
the module-level `protected-access` disable the other 18 test modules use.
- `test_error_detail_preserved` had a bare `yield` after `raise` purely to make
the closure an async generator, which reads as unreachable code. It now
yields first and raises after, matching the neighbouring test.
- `test_agentstudio_protocol` used `import dashscope.agentstudio as ...`.
Python 3.9:
- `test_record_is_attributed_to_the_caller` read `caplog.records`, which was
empty because the SDK logger does not propagate and caplog attaches at the
root. It now attaches a collecting handler to the module's own logger, so the
stacklevel attribution is verified on every supported version.
Tests: 1174 passed, 6 skipped. All pre-commit hooks pass.
0 commit comments