From 64dd282179b6f547558b90134054cb8310b88d8a Mon Sep 17 00:00:00 2001 From: Garrett Marconet Date: Wed, 6 Nov 2024 09:14:57 -0800 Subject: [PATCH] use abstractmethod for interface --- backend/engine/plugins/cicd_tools/interfaces/detector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/engine/plugins/cicd_tools/interfaces/detector.py b/backend/engine/plugins/cicd_tools/interfaces/detector.py index f7509202..7dfd45f9 100644 --- a/backend/engine/plugins/cicd_tools/interfaces/detector.py +++ b/backend/engine/plugins/cicd_tools/interfaces/detector.py @@ -1,3 +1,4 @@ +from abc import ABC, abstractmethod from typing import TypedDict @@ -12,6 +13,7 @@ class DetectorResult(TypedDict): errors: list[str] -class Detector: +class Detector(ABC): + @abstractmethod def check(self, path: str) -> DetectorResult: - raise NotImplementedError() + pass