test+types: address Copilot nits on #15318

Three minor cleanups from Copilot's review on #15318:

1. ``_parse_launchd_list_output`` return type: ``set`` → ``set[int]``
   (matches the ``seen: set[int] = set()`` style elsewhere in the
   module).
2. ``_get_service_pids`` return type + local: same parameterization;
   was bare ``set`` before this branch existed, but Copilot flagged
   the pre-existing annotation while reviewing the diff so worth
   tightening as a drive-by.
3. ``unittest.mock.patch`` was imported in
   ``test_gateway_pid_detection_macos.py`` but never called — the
   tests use ``monkeypatch`` exclusively.  Removed the unused import.

No behaviour change.  39/39 tests still pass locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brian D. Evans 2026-04-24 14:26:18 -07:00
parent 5751372877
commit 0344959d46
2 changed files with 4 additions and 5 deletions

View file

@ -33,7 +33,6 @@ These tests pin the fixes at the production-code entry points:
invocation ever regresses to ``eww``.
"""
from types import SimpleNamespace
from unittest.mock import patch
import pytest