From d8279483220484a9679841bb92149c72d0ab9280 Mon Sep 17 00:00:00 2001 From: dominik003 Date: Mon, 9 Oct 2023 16:59:09 +0200 Subject: [PATCH] chore: Move capellambse to dev dependencies --- .pre-commit-config.yaml | 1 + .../projects/toolmodels/modelsources/git/handler/handler.py | 6 +++++- backend/pyproject.toml | 3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) 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.*",