Cybersecurity-Projects/PROJECTS/intermediate/dlp-scanner/tests/test_network
CarterPerez-dev 79851054fd fix(dlp-scanner): a call site that already names its arguments should say so in the signature
ruff 0.16.0 stabilized PLR0917 (too-many-positional-arguments) out of
preview. The project selects PL wholesale and CI installs ruff unpinned,
so the rule switched on by itself and four signatures went red without a
line of source changing.

Every flagged call site already passed the tail arguments by keyword, so
the signatures were understating a contract the code had already adopted.
Mark that tail keyword-only:

  DetectorRegistry.__init__   - six optional config knobs, all keyword
  _append_findings            - matches/text positional, context keyword
  _process_dns_packet         - packet data positional, context keyword
  _make_packet (test helper)  - eight defaulted fields, all keyword

_process_dns_packet was the only caller passing positionally; it now
names path/packet_num/dns_detector/result like every sibling call does.

313 tests pass, ruff clean on both 0.15.7 and 0.16.1, mypy unchanged at
its three pre-existing errors.
2026-07-31 19:09:36 -04:00
..
__init__.py feat: dlp scanner — multi-format data loss prevention scanner 2026-04-10 17:14:30 -04:00
test_exfiltration.py feat: dlp scanner — multi-format data loss prevention scanner 2026-04-10 17:14:30 -04:00
test_flow_tracker.py fix(dlp-scanner): a call site that already names its arguments should say so in the signature 2026-07-31 19:09:36 -04:00
test_pcap.py feat: dlp scanner — multi-format data loss prevention scanner 2026-04-10 17:14:30 -04:00
test_protocols.py feat: dlp scanner — multi-format data loss prevention scanner 2026-04-10 17:14:30 -04:00