moving deal dependencies to tests only
This commit is contained in:
parent
b518d92678
commit
13b685f7af
18
pkgs/clan-cli/clan_cli/deal.py
Normal file
18
pkgs/clan-cli/clan_cli/deal.py
Normal 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()
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user