Use ruff and ruff format (#534)

Replaces the previously used linting and code formatting tools with ruff.
This commit is contained in:
Teemu R
2023-10-29 23:15:42 +01:00
committed by GitHub
parent 0061668c9f
commit c431dbb832
26 changed files with 220 additions and 174 deletions

View File

@@ -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])))