fix: auto-fix code issues (cron)

- 修复隐式 Optional 类型注解 (RUF013)
- 修复不必要的赋值后返回 (RET504)
- 优化列表推导式 (PERF401)
- 修复未使用的参数 (ARG002)
- 清理重复导入
- 优化异常处理
This commit is contained in:
AutoFix Bot
2026-03-03 21:11:47 +08:00
parent d17a58ceae
commit 259f2c90d0
36 changed files with 1651 additions and 863 deletions

View File

@@ -159,7 +159,8 @@ def test_cache_manager() -> None:
# 批量操作
cache.set_many(
{"batch_key_1": "value1", "batch_key_2": "value2", "batch_key_3": "value3"}, ttl=60,
{"batch_key_1": "value1", "batch_key_2": "value2", "batch_key_3": "value3"},
ttl=60,
)
print(" ✓ 批量设置缓存")
@@ -208,7 +209,8 @@ def test_task_queue() -> None:
# 提交任务
task_id = queue.submit(
task_type="test_task", payload={"test": "data", "timestamp": time.time()},
task_type="test_task",
payload={"test": "data", "timestamp": time.time()},
)
print(" ✓ 提交任务: {task_id}")