mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-14 05:56:40 +00:00
Install and use ruff format
instead of black for code formatting. (#12585)
Best to review one commit at a time, since two of the commits are 100% autogenerated changes from running `ruff format`: - Install and use `ruff format` instead of black for code formatting. - Output of `ruff format .` in the `langchain` package. - Use `ruff format` in experimental package. - Format changes in experimental package by `ruff format`. - Manual formatting fixes to make `ruff .` pass.
This commit is contained in:
@@ -95,7 +95,8 @@ def test_update_with_delayed_score_with_auto_validator_throws() -> None:
|
||||
assert selection_metadata.selected.score == 3.0 # type: ignore
|
||||
with pytest.raises(RuntimeError):
|
||||
chain.update_with_delayed_score(
|
||||
chain_response=response, score=100 # type: ignore
|
||||
chain_response=response,
|
||||
score=100, # type: ignore
|
||||
)
|
||||
|
||||
|
||||
@@ -121,7 +122,9 @@ def test_update_with_delayed_score_force() -> None:
|
||||
selection_metadata = response["selection_metadata"] # type: ignore
|
||||
assert selection_metadata.selected.score == 3.0 # type: ignore
|
||||
chain.update_with_delayed_score(
|
||||
chain_response=response, score=100, force_score=True # type: ignore
|
||||
chain_response=response,
|
||||
score=100,
|
||||
force_score=True, # type: ignore
|
||||
)
|
||||
assert selection_metadata.selected.score == 100.0 # type: ignore
|
||||
|
||||
|
Reference in New Issue
Block a user