fix: resolve all pre-existing ruff lint errors

Fix E501 line-too-long in backlog.py, network.py, test_network.py.
Fix F541 f-string-without-placeholders in network.py.
Fix I001 unsorted imports in network.py.
Remove unused datetime import in test_cert.py (F401).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-21 19:13:34 +01:00
parent 2ab5f95476
commit 638f12dbb3
4 changed files with 30 additions and 14 deletions

View File

@@ -91,7 +91,6 @@ class TestGenerateCert:
assert fp1 != fp2 # New cert = new fingerprint
def test_custom_validity_days(self, data_dir: Path) -> None:
import datetime
from cryptography import x509 as x509_mod
pem = generate_cert(data_dir, "libera", "testnick", validity_days=365)
cert_data = pem.read_bytes()

View File

@@ -324,7 +324,8 @@ class TestHandleWelcome:
writer.drain = AsyncMock()
net._writer = writer
await net._handle(_msg(":server 001 coolguy :Welcome to the network coolguy!user@host.example.com"))
welcome = ":server 001 coolguy :Welcome to the network coolguy!user@host.example.com"
await net._handle(_msg(welcome))
assert net.nick == "coolguy"
assert net.state == State.PROBATION
@@ -337,7 +338,8 @@ class TestHandleWelcome:
writer.drain = AsyncMock()
net._writer = writer
await net._handle(_msg(":server 001 nick :Welcome to the IRC Network nick!user@visible.host.com"))
welcome = ":server 001 nick :Welcome to the IRC Network nick!user@visible.host.com"
await net._handle(_msg(welcome))
assert net.visible_host == "visible.host.com"