feat(python): Enable pycodestyle (W) warning ruleset with ruff (#69)

Refactor codebase to fix pre-existing style issues flagged by the ruleset.
This commit is contained in:
QuantumGhost
2025-03-24 19:21:00 +08:00
committed by GitHub
parent c83c6f41ed
commit bf79e6591d
3 changed files with 7 additions and 3 deletions
+4
View File
@@ -50,6 +50,10 @@ select = [
#
# https://docs.astral.sh/ruff/rules/boolean-positional-value-in-call/
"FBT003",
# Pycodestyle's warning
# https://docs.astral.sh/ruff/rules/#warning-w
"W",
]
ignore = [
@@ -291,7 +291,7 @@ class ParameterRule(BaseModel):
data = copy_default_parameter_rule
except ValueError:
pass
if not data.get("label"):
data["label"] = I18nObject(en_US=data["name"])
+2 -2
View File
@@ -1,4 +1,4 @@
ENGLISH_REACT_COMPLETION_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible.
ENGLISH_REACT_COMPLETION_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible.
{{instruction}}
@@ -47,7 +47,7 @@ Thought:""" # noqa: E501
ENGLISH_REACT_COMPLETION_AGENT_SCRATCHPAD_TEMPLATES = """Observation: {{observation}}
Thought:"""
ENGLISH_REACT_CHAT_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible.
ENGLISH_REACT_CHAT_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible.
{{instruction}}