Convert formatting to use ruff instead of yapf + isort (#26247)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-05 15:06:22 +01:00
committed by GitHub
parent 17edd8a807
commit d6953beb91
1508 changed files with 115244 additions and 94146 deletions

View File

@@ -259,15 +259,15 @@ def test_reasoning(
output = deepseek_r1_qwen_tokenizer.tokenize(param_dict["output"])
# decode everything to tokens
output_tokens: list[str] = [
deepseek_r1_qwen_tokenizer.convert_tokens_to_string([token])
for token in output
deepseek_r1_qwen_tokenizer.convert_tokens_to_string([token]) for token in output
]
parser: ReasoningParser = ReasoningParserManager.get_reasoning_parser(
parser_name)(deepseek_r1_qwen_tokenizer)
parser: ReasoningParser = ReasoningParserManager.get_reasoning_parser(parser_name)(
deepseek_r1_qwen_tokenizer
)
reasoning, content = run_reasoning_extraction(parser,
output_tokens,
streaming=streaming)
reasoning, content = run_reasoning_extraction(
parser, output_tokens, streaming=streaming
)
assert reasoning == param_dict["reasoning_content"]
assert content == param_dict["content"]
@@ -281,7 +281,8 @@ def test_reasoning(
if param_dict["content"] is not None:
content = parser.extract_content_ids(output_ids)
assert content == deepseek_r1_qwen_tokenizer.convert_tokens_to_ids(
deepseek_r1_qwen_tokenizer.tokenize(param_dict["content"]))
deepseek_r1_qwen_tokenizer.tokenize(param_dict["content"])
)
else:
content = parser.extract_content_ids(output)
assert content == []