mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Use ruff and ruff format (#534)
Replaces the previously used linting and code formatting tools with ruff.
This commit is contained in:
@@ -59,13 +59,13 @@ async def main(addrs, rounds):
|
||||
|
||||
if test_gathered:
|
||||
print("=== Testing using gather on all devices ===")
|
||||
for i in range(rounds):
|
||||
for _i in range(rounds):
|
||||
data.append(await _update_concurrently(devs))
|
||||
await asyncio.sleep(2)
|
||||
|
||||
await asyncio.sleep(5)
|
||||
|
||||
for i in range(rounds):
|
||||
for _i in range(rounds):
|
||||
data.append(await _update_sequentially(devs))
|
||||
await asyncio.sleep(2)
|
||||
|
||||
@@ -77,7 +77,7 @@ async def main(addrs, rounds):
|
||||
futs = []
|
||||
data = []
|
||||
locks = {dev: asyncio.Lock() for dev in devs}
|
||||
for i in range(rounds):
|
||||
for _i in range(rounds):
|
||||
for dev in devs:
|
||||
futs.append(asyncio.ensure_future(_update(dev, locks[dev])))
|
||||
|
||||
|
Reference in New Issue
Block a user