From fe3aa9c2812fb76451e5b7ac3e5b3d48f2021380 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Tue, 16 Apr 2024 16:03:39 +0800 Subject: [PATCH] little update --- adbutils/shell.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/adbutils/shell.py b/adbutils/shell.py index 0807d63..fad8da7 100644 --- a/adbutils/shell.py +++ b/adbutils/shell.py @@ -6,9 +6,10 @@ import abc -import time, datetime +import datetime import json import re +import time from typing import List, Optional, Union from adbutils._proto import WindowSize, AppInfo, RunningAppInfo from adbutils.errors import AdbError, AdbInstallError @@ -52,7 +53,7 @@ def volume_up(self, times: int = 1): :param times: times to increase volumeļ¼Œdefault is 1(Wake up volume bar). :return: """ - for i in range(times): + for _ in range(times): self.shell("input keyevent VOLUME_UP") time.sleep(0.5) @@ -62,7 +63,7 @@ def volume_down(self, times: int = 1): :param times: times to decrease volumeļ¼Œdefault is 1(Wake up volume bar). :return: """ - for i in range(times): + for _ in range(times): self.shell("input keyevent VOLUME_DOWN") time.sleep(0.5)