mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 13:33:30 +01:00
MAESTRO: add base scanner protocol
This commit is contained in:
14
backend/app/engine/scanner_base.py
Normal file
14
backend/app/engine/scanner_base.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Protocol
|
||||
|
||||
from .models import TestResult
|
||||
from .parser import ParsedHeader
|
||||
|
||||
|
||||
class BaseScanner(Protocol):
|
||||
id: int
|
||||
name: str
|
||||
|
||||
def run(self, headers: list[ParsedHeader]) -> TestResult | None:
|
||||
"""Run the scanner against parsed headers."""
|
||||
Reference in New Issue
Block a user