Skip to content

Commit 17ba0c6

Browse files
style: apply black formatting for CI lint
1 parent 4370768 commit 17ba0c6

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

sovereignmap_production_backend_v2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ def hud_data():
328328
{
329329
"last_audit_accuracy": f"{current_accuracy:.2f}%",
330330
"bft_resilience": "55.5% Verified",
331-
"dao_signatures": len(dao.founding_signatures)
332-
if dao
333-
else len(FOUNDERS),
331+
"dao_signatures": (
332+
len(dao.founding_signatures) if dao else len(FOUNDERS)
333+
),
334334
}
335335
),
336336
200,

tests/scripts/python/gpu-test-suite.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ def get_devices() -> Dict[str, bool]:
7373
"""Check available accelerators"""
7474
devices = {
7575
"cuda": torch.cuda.is_available(),
76-
"npu": hasattr(torch, "npu") and torch.npu.is_available()
77-
if hasattr(torch, "npu")
78-
else False,
76+
"npu": (
77+
hasattr(torch, "npu") and torch.npu.is_available()
78+
if hasattr(torch, "npu")
79+
else False
80+
),
7981
"cpu": True,
8082
}
8183
return devices

tests/scripts/python/npu-gpu-cpu-benchmark.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ def detect_devices() -> Dict[str, Dict]:
6868
"available": torch.cuda.is_available(),
6969
"name": "NVIDIA GPU (CUDA)",
7070
"priority": 2,
71-
"device_count": torch.cuda.device_count()
72-
if torch.cuda.is_available()
73-
else 0,
71+
"device_count": (
72+
torch.cuda.device_count() if torch.cuda.is_available() else 0
73+
),
7474
}
7575
if devices["cuda"]["available"]:
7676
try:
@@ -546,9 +546,9 @@ def main():
546546
device = (
547547
args.device or "npu"
548548
if DeviceManager.detect_devices()["npu"]["available"]
549-
else "cuda"
550-
if DeviceManager.detect_devices()["cuda"]["available"]
551-
else "cpu"
549+
else (
550+
"cuda" if DeviceManager.detect_devices()["cuda"]["available"] else "cpu"
551+
)
552552
)
553553
logger.info(f"\nRunning contention test on {device.upper()}...")
554554
contention = NPUContentionTest(args.nodes, device)

0 commit comments

Comments
 (0)