mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-08-25 12:29:32 -04:00
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:
@@ -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"])
|
||||
|
||||
|
||||
@@ -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}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user