chore: refurbish Python code by applying refurb linter rules (#8296)

This commit is contained in:
Bowen Liang
2024-09-12 15:50:49 +08:00
committed by GitHub
parent c69f5b07ba
commit 40fb4d16ef
105 changed files with 220 additions and 276 deletions

View File

@@ -81,13 +81,11 @@ class AppDslService:
raise ValueError("Missing app in data argument")
# get app basic info
name = args.get("name") if args.get("name") else app_data.get("name")
description = args.get("description") if args.get("description") else app_data.get("description", "")
icon_type = args.get("icon_type") if args.get("icon_type") else app_data.get("icon_type")
icon = args.get("icon") if args.get("icon") else app_data.get("icon")
icon_background = (
args.get("icon_background") if args.get("icon_background") else app_data.get("icon_background")
)
name = args.get("name") or app_data.get("name")
description = args.get("description") or app_data.get("description", "")
icon_type = args.get("icon_type") or app_data.get("icon_type")
icon = args.get("icon") or app_data.get("icon")
icon_background = args.get("icon_background") or app_data.get("icon_background")
use_icon_as_answer_icon = app_data.get("use_icon_as_answer_icon", False)
# import dsl and create app