fix: 修复代码格式,确保行末有换行符
This commit is contained in:
1 parent
44519f2f6b
commit
29bf263080
1 file changed
+6
-4
@@ -9,6 +9,7 @@ sys.path.insert(0, os.path.dirname(__file__))
|
||||
|
||||
from douyin.fudai.douyin_fudai_core import should_skip_fudai_by_config
|
||||
|
||||
|
||||
# 创建一个模拟的 analyser 对象
|
||||
class MockAnalyser:
|
||||
def _log_kv(self, category, message, **kwargs):
|
||||
@@ -16,6 +17,7 @@ class MockAnalyser:
|
||||
for key, value in kwargs.items():
|
||||
print(f" {key}: {value}")
|
||||
|
||||
|
||||
# 测试筛选逻辑
|
||||
analyser = MockAnalyser()
|
||||
|
||||
@@ -23,13 +25,13 @@ analyser = MockAnalyser()
|
||||
# 格式为 (prize_value_yuan, participants, copies, content, button_text, countdown_tuple, ...)
|
||||
detail = (
|
||||
75.0, # prize_value_yuan
|
||||
10, # participants
|
||||
1, # copies
|
||||
"", # content
|
||||
10, # participants
|
||||
1, # copies
|
||||
"", # content
|
||||
"一键发表评论", # button_text
|
||||
(time.time() + 120, time.time() + 120), # countdown (start, end)
|
||||
)
|
||||
|
||||
result, reason = should_skip_fudai_by_config(analyser=analyser, detail=detail)
|
||||
|
||||
print(f"\n筛选结果: {'跳过' if result else '参与'}, 原因: {reason}")
|
||||
print(f"\n筛选结果: {'跳过' if result else '参与'}, 原因: {reason}")
|
||||
Reference in new issue
Block a user