diff --git a/src/docgen/detectors/base.py b/src/docgen/detectors/base.py index 3857a8d..090a21d 100644 --- a/src/docgen/detectors/base.py +++ b/src/docgen/detectors/base.py @@ -1,12 +1,13 @@ -"""Base detector abstract class.""" +{"""Base detector abstract class.""" from abc import ABC, abstractmethod from pathlib import Path -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING + from docgen.models import Endpoint if TYPE_CHECKING: - from typing import List + pass class BaseDetector(ABC): @@ -28,12 +29,12 @@ class BaseDetector(ABC): """Scan a directory for endpoints.""" endpoints = [] pattern = "**/*" if recursive else "*" - + for file_path in directory.glob(pattern): if file_path.is_file() and self.can_detect(file_path): try: endpoints.extend(self.detect_endpoints(file_path)) except Exception: continue - + return endpoints