diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53e784cdf..bc37ad78a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,6 +56,7 @@ repos: - fastapi - pydantic - sqlalchemy + - capellambse==0.5.35.dev4 - repo: local hooks: - id: pylint diff --git a/backend/capellacollab/projects/toolmodels/modelsources/git/handler/handler.py b/backend/capellacollab/projects/toolmodels/modelsources/git/handler/handler.py index 06f9ac632..b835d9f26 100644 --- a/backend/capellacollab/projects/toolmodels/modelsources/git/handler/handler.py +++ b/backend/capellacollab/projects/toolmodels/modelsources/git/handler/handler.py @@ -1,19 +1,23 @@ # SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors # SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + import abc import datetime import json import typing as t import requests -from capellambse import diagram_cache import capellacollab.projects.toolmodels.modelsources.git.models as git_models import capellacollab.settings.modelsources.git.models as settings_git_models from .. import exceptions +if t.TYPE_CHECKING: + from capellambse import diagram_cache + class GitHandler: def __init__( diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 7d24ea5b9..3c769b627 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -27,7 +27,6 @@ dependencies = [ "alembic==1.10.4", "appdirs", "cachetools", - "capellambse==0.5.35.dev4", "fastapi>=0.101.0", "kubernetes", "msal", @@ -53,6 +52,7 @@ Homepage = "https://github.com/DSD-DBS/capella-collab-manager" [project.optional-dependencies] dev = [ "black", + "capellambse==0.5.35.dev4", "deepdiff", "isort", "mypy", @@ -111,7 +111,6 @@ allow_untyped_defs = true [[tool.mypy.overrides]] # Untyped third party libraries module = [ - "capellambse.*", "kubernetes.*", "prometheus_client.*", "openshift.*",