From 958a39e2e8093421a84da358bef2f403f42a9e7e Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Mon, 16 Sep 2024 15:16:50 -0400 Subject: [PATCH] temp fixes --- safety/scan/command.py | 2 -- safety/scan/finder/handlers.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/safety/scan/command.py b/safety/scan/command.py index b33eeee..230b9c6 100644 --- a/safety/scan/command.py +++ b/safety/scan/command.py @@ -45,8 +45,6 @@ class ScannableEcosystems(Enum): """Enum representing scannable ecosystems.""" PYTHON = Ecosystem.PYTHON.value - PYPROJECT_TOML = Ecosystem.PYPROJECT_TOML.value - def process_report( obj: Any, console: Console, report: ReportModel, output: str, diff --git a/safety/scan/finder/handlers.py b/safety/scan/finder/handlers.py index 56f70fa..f9ee158 100644 --- a/safety/scan/finder/handlers.py +++ b/safety/scan/finder/handlers.py @@ -52,7 +52,7 @@ def can_handle(self, root: str, file_name: str, include_files: Dict[FileType, Li return None @abstractmethod - def download_required_assets(self, session) -> Dict[str, str]: + def download_required_assets(self, session): """ Abstract method to download required assets for handling files. Should be implemented by subclasses. @@ -116,7 +116,7 @@ def download_required_assets(self, session): class PyProjectTomlHandler(FileHandler): def __init__(self) -> None: super().__init__() - self.ecosystem = Ecosystem.PYPROJECT_TOML + self.ecosystem = Ecosystem.PYTHON def download_required_assets(self, session): from safety.safety import fetch_database @@ -174,5 +174,5 @@ def download_required_assets(self, session) -> None: ECOSYSTEM_HANDLER_MAPPING = MappingProxyType({ Ecosystem.PYTHON: PythonFileHandler, Ecosystem.SAFETY_PROJECT: SafetyProjectFileHandler, - Ecosystem.PYPROJECT_TOML: PyProjectTomlHandler, + # Ecosystem.PYPROJECT_TOML: PyProjectTomlHandler, })