moving deal dependencies to tests only
All checks were successful
checks-impure / test (pull_request) Successful in 1m33s
checks / test (pull_request) Successful in 2m50s

This commit is contained in:
Jörg Thalheim 2023-11-10 12:33:14 +01:00
parent b518d92678
commit 13b685f7af
3 changed files with 21 additions and 4 deletions

View File

@ -0,0 +1,18 @@
from types import ModuleType
from typing import Callable
class FakeDeal:
def __getattr__(self, _name: str) -> "FakeDeal":
return FakeDeal()
def __call__(self, func: Callable) -> Callable:
return func
try:
import deal as real_deal
deal: ModuleType | FakeDeal = real_deal
except ImportError:
deal = FakeDeal()

View File

@ -12,9 +12,8 @@ from pathlib import Path
from typing import Any, Iterator, Optional, Type, TypeVar
from uuid import UUID, uuid4
import deal
from .custom_logger import ThreadFormatter, get_caller
from .deal import deal
from .errors import ClanError

View File

@ -45,8 +45,6 @@ let
argcomplete # optional dependency: if not enabled, shell completion will not work
fastapi
uvicorn # optional dependencies: if not enabled, webui subcommand will not work
deal
schemathesis
];
pytestDependencies = runtimeDependencies ++ dependencies ++ [
@ -55,6 +53,8 @@ let
pytest-subprocess
pytest-xdist
pytest-timeout
deal
schemathesis
remote-pdb
ipdb
openssh