mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 23:13:31 +00:00
core: Add ruff rules PTH (pathlib) (#29338)
See https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
committed by
GitHub
parent
86b364de3b
commit
9e6ffd1264
@@ -354,7 +354,7 @@ def test_prompt_from_file_with_partial_variables() -> None:
|
||||
template = "This is a {foo} test {bar}."
|
||||
partial_variables = {"bar": "baz"}
|
||||
# when
|
||||
with mock.patch("builtins.open", mock.mock_open(read_data=template)):
|
||||
with mock.patch("pathlib.Path.open", mock.mock_open(read_data=template)):
|
||||
prompt = PromptTemplate.from_file(
|
||||
"mock_file_name", partial_variables=partial_variables
|
||||
)
|
||||
|
Reference in New Issue
Block a user