core: Bump ruff version to 0.9 (#29201)

Also run some preview autofix and formatting

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Christophe Bornet
2025-01-22 01:20:09 +01:00
committed by GitHub
parent 6f95db81b7
commit e4a78dfc2a
45 changed files with 460 additions and 336 deletions

View File

@@ -1398,9 +1398,7 @@ def _create_template_from_message_type(
elif len(template) == 2 and isinstance(template[1], bool):
var_name_wrapped, is_optional = template
if not isinstance(var_name_wrapped, str):
msg = (
"Expected variable name to be a string." f" Got: {var_name_wrapped}"
)
msg = f"Expected variable name to be a string. Got: {var_name_wrapped}"
raise ValueError(msg)
if var_name_wrapped[0] != "{" or var_name_wrapped[-1] != "}":
msg = (