Source code for swh.vulns.storage

# Copyright (C) 2026  The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information

from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from swh.vulns.storage.interface import VulnerabilitiesStorageInterface


[docs] def get_vulnerabilities_storage(cls: str, **kwargs) -> VulnerabilitiesStorageInterface: from swh.core.config import get_swh_backend_module _, BackendClass = get_swh_backend_module("vulns.storage", cls) assert BackendClass is not None return BackendClass(**kwargs)