mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 06:26:12 +00:00
chore(cli): fix some ruff preview rules (#32803)
This commit is contained in:
committed by
GitHub
parent
4e39c164bb
commit
5bf0b218c8
@@ -73,7 +73,7 @@ def generic(
|
||||
else:
|
||||
dumped = dump_migrations_as_grit(name, migrations)
|
||||
|
||||
Path(output).write_text(dumped)
|
||||
Path(output).write_text(dumped, encoding="utf-8")
|
||||
|
||||
|
||||
def handle_partner(pkg: str, output: Optional[str] = None) -> None:
|
||||
@@ -84,7 +84,7 @@ def handle_partner(pkg: str, output: Optional[str] = None) -> None:
|
||||
data = dump_migrations_as_grit(name, migrations)
|
||||
output_name = f"{name}.grit" if output is None else output
|
||||
if migrations:
|
||||
Path(output_name).write_text(data)
|
||||
Path(output_name).write_text(data, encoding="utf-8")
|
||||
click.secho(f"LangChain migration script saved to {output_name}")
|
||||
else:
|
||||
click.secho(f"No migrations found for {pkg}", fg="yellow")
|
||||
@@ -109,7 +109,7 @@ def json_to_grit(json_file: str) -> None:
|
||||
name = file.stem
|
||||
data = dump_migrations_as_grit(name, migrations)
|
||||
output_name = f"{name}.grit"
|
||||
Path(output_name).write_text(data)
|
||||
Path(output_name).write_text(data, encoding="utf-8")
|
||||
click.secho(f"GritQL migration script saved to {output_name}")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user