mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
core: Add ruff rules for pycodestyle Warning (W) (#26964)
All auto-fixes.
This commit is contained in:
committed by
GitHub
parent
9404e7af9d
commit
db8845a62a
@@ -136,7 +136,7 @@ WITHOUT_END_BRACKET = """Here is a response formatted as schema:
|
||||
```json
|
||||
{
|
||||
"foo": "bar"
|
||||
|
||||
|
||||
|
||||
"""
|
||||
|
||||
@@ -146,7 +146,7 @@ WITH_END_BRACKET = """Here is a response formatted as schema:
|
||||
{
|
||||
"foo": "bar"
|
||||
}
|
||||
|
||||
|
||||
"""
|
||||
|
||||
WITH_END_TICK = """Here is a response formatted as schema:
|
||||
@@ -155,7 +155,7 @@ WITH_END_TICK = """Here is a response formatted as schema:
|
||||
{
|
||||
"foo": "bar"
|
||||
}
|
||||
```
|
||||
```
|
||||
"""
|
||||
|
||||
WITH_END_TEXT = """Here is a response formatted as schema:
|
||||
@@ -164,8 +164,8 @@ WITH_END_TEXT = """Here is a response formatted as schema:
|
||||
{
|
||||
"foo": "bar"
|
||||
|
||||
```
|
||||
This should do the trick
|
||||
```
|
||||
This should do the trick
|
||||
"""
|
||||
|
||||
TEST_CASES = [
|
||||
|
@@ -219,7 +219,7 @@ def test_mustache_prompt_from_template(snapshot: SnapshotAssertion) -> None:
|
||||
yo
|
||||
|
||||
hello
|
||||
is a test."""
|
||||
is a test.""" # noqa: W293
|
||||
)
|
||||
assert prompt.input_variables == ["foo"]
|
||||
if PYDANTIC_VERSION >= (2, 9):
|
||||
@@ -408,7 +408,7 @@ def test_prompt_from_jinja2_template() -> None:
|
||||
# Empty input variable.
|
||||
template = """Hello there
|
||||
There is no variable here {
|
||||
Will it get confused{ }?
|
||||
Will it get confused{ }?
|
||||
"""
|
||||
prompt = PromptTemplate.from_template(template, template_format="jinja2")
|
||||
expected_prompt = PromptTemplate(
|
||||
|
Reference in New Issue
Block a user