chore: cleanup ruff flake8-simplify linter rules (#8286)
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
0bb7569d46
commit
0f14873255
34 changed files with 108 additions and 136 deletions
|
|
@ -20,7 +20,7 @@ class ToolEntity(BaseModel):
|
|||
if not isinstance(value, dict):
|
||||
raise ValueError("tool_configurations must be a dictionary")
|
||||
|
||||
for key in values.data.get("tool_configurations", {}).keys():
|
||||
for key in values.data.get("tool_configurations", {}):
|
||||
value = values.data.get("tool_configurations", {}).get(key)
|
||||
if not isinstance(value, str | int | float | bool):
|
||||
raise ValueError(f"{key} must be a string")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue