feat: MAINT-001 - Fix Ruff violations across all Python source

This commit is contained in:
Dobromir Popov
2026-07-14 14:17:23 +03:00
parent a0f28b5631
commit 454a681a50
21 changed files with 30 additions and 52 deletions

View File

@@ -5,8 +5,7 @@ from __future__ import annotations
import json
import threading
import time
from pathlib import Path
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock
# ---------------------------------------------------------------------------
@@ -277,7 +276,6 @@ def test_relay_server_peer_list_grows_on_connect():
def test_relay_circuit_relay_proxies_message():
"A node behind NAT (client_a) receives a message via circuit relay from client_b.\n\nTags: gossip, network, relay"
import websockets.sync.client # type: ignore[import]
from meshnet_relay.server import RelayServer
relay = RelayServer(host="127.0.0.1", port=0)
@@ -755,7 +753,6 @@ def test_node_relay_bridge_reconnects_after_failed_connection(monkeypatch):
def _start_tracker_and_register(extra_fields: dict) -> dict:
"""Helper: start tracker, register node with extra gossip fields, return response."""
import http.server
import json as _json
import urllib.request
@@ -766,7 +763,7 @@ def _start_tracker_and_register(extra_fields: dict) -> dict:
url = f"http://127.0.0.1:{port}"
payload = {
"endpoint": f"http://127.0.0.1:8001",
"endpoint": "http://127.0.0.1:8001",
"shard_start": 0,
"shard_end": 7,
"model": "stub-model",