Merge pull request 'moving deal dependencies to tests only' (#483) from zerotier into main
All checks were successful
assets1 / test (push) Successful in 19s
checks / test (push) Successful in 45s
checks-impure / test (push) Successful in 1m30s

This commit is contained in:
clan-bot 2023-11-10 11:43:45 +00:00
commit d848298017
4 changed files with 22 additions and 5 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

@ -51,7 +51,7 @@ def breakpoint_container(
def breakpoint_shell(
work_dir: Path,
work_dir: Path = Path(os.getcwd()),
env: Optional[Dict[str, str]] = None,
cmd: Optional[List[str]] = None,
) -> None:

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