moving deal dependencies to tests only
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user