core: Add ruff rules for pycodestyle Warning (W) (#26964)

All auto-fixes.
This commit is contained in:
Christophe Bornet
2024-09-30 15:31:43 +02:00
committed by GitHub
parent 9404e7af9d
commit db8845a62a
32 changed files with 119 additions and 119 deletions

View File

@@ -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 = [

View File

@@ -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(