feat: 优化代码格式和可读性,增强日志清理策略配置
This commit is contained in:
1 parent
dcded08796
commit
917438af2e
12 files changed
+190
-59
No files matched your search
@@ -1,15 +1,19 @@
|
||||
from douyin.handlers import douyin_swipe_ops
|
||||
from douyin.core.douyin_fudai import fudai_analyse
|
||||
|
||||
|
||||
class DummyOp:
|
||||
def _adb(self):
|
||||
# Return path to non-existing adb to force fallback
|
||||
return "adb"
|
||||
|
||||
def swipe(self, device_id, sx, sy, ex, ey, duration_ms):
|
||||
print(f"DummyOp.swipe called device={device_id} from ({sx},{sy}) to ({ex},{ey}) duration={duration_ms}")
|
||||
print(
|
||||
f"DummyOp.swipe called device={device_id} from ({sx},{sy}) to ({ex},{ey}) duration={duration_ms}"
|
||||
)
|
||||
|
||||
|
||||
def simulate_once(i:int):
|
||||
def simulate_once(i: int):
|
||||
a = fudai_analyse()
|
||||
a.operation = DummyOp()
|
||||
a.device_id = f"DUMMY{i}"
|
||||
@@ -18,6 +22,7 @@ def simulate_once(i:int):
|
||||
print(f"--- simulate swipe #{i} ---")
|
||||
douyin_swipe_ops.swipe_up_switch_live(a)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
if __name__ == "__main__":
|
||||
for i in range(1, 11):
|
||||
simulate_once(i)
|
||||
Reference in new issue
Block a user