Removed python deal.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
from collections.abc import Callable
|
||||
from types import ModuleType
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
class AnyCall(Protocol):
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any:
|
||||
...
|
||||
|
||||
|
||||
class FakeDeal:
|
||||
def __getattr__(self, name: str) -> AnyCall:
|
||||
return self.mock_call
|
||||
|
||||
def mock_call(self, *args: Any, **kwargs: Any) -> Callable[[AnyCall], AnyCall]:
|
||||
def wrapper(func: AnyCall) -> AnyCall:
|
||||
return func
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
try:
|
||||
import deal as real_deal
|
||||
|
||||
deal: ModuleType | FakeDeal = real_deal
|
||||
except ImportError:
|
||||
deal = FakeDeal()
|
||||
@@ -5,9 +5,7 @@ import tempfile
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from .deal import deal
|
||||
from .dirs import nixpkgs_flake, nixpkgs_source
|
||||
from .errors import ClanError
|
||||
|
||||
|
||||
def nix_command(flags: list[str]) -> list[str]:
|
||||
@@ -85,7 +83,6 @@ def nix_metadata(flake_url: str | Path) -> dict[str, Any]:
|
||||
return data
|
||||
|
||||
|
||||
@deal.raises(ClanError)
|
||||
def nix_shell(packages: list[str], cmd: list[str]) -> list[str]:
|
||||
# we cannot use nix-shell inside the nix sandbox
|
||||
# in our tests we just make sure we have all the packages
|
||||
|
||||
@@ -39,7 +39,7 @@ def graphics_options(vm: VmConfig) -> list[str]:
|
||||
|
||||
# Check if the version is greater than 8.1.3 to enable virtio audio
|
||||
# if get_qemu_version() > [8, 1, 3]:
|
||||
common = ["-audio", "driver=pa,model=virtio"]
|
||||
# common = ["-audio", "driver=pa,model=virtio"]
|
||||
|
||||
if vm.wayland:
|
||||
# fmt: off
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
, gnupg
|
||||
, e2fsprogs
|
||||
, mypy
|
||||
, deal
|
||||
, rope
|
||||
, clan-core-path
|
||||
, writeShellScriptBin
|
||||
@@ -48,7 +47,6 @@ let
|
||||
pytest-subprocess
|
||||
pytest-xdist
|
||||
pytest-timeout
|
||||
deal
|
||||
remote-pdb
|
||||
ipdb
|
||||
openssh
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ inputs, self, lib, ... }:
|
||||
{
|
||||
perSystem = { self', pkgs, system, ... }:
|
||||
perSystem = { self', pkgs, ... }:
|
||||
let
|
||||
flakeLock = lib.importJSON (self + /flake.lock);
|
||||
flakeInputs = (builtins.removeAttrs inputs [ "self" ]);
|
||||
@@ -35,9 +35,6 @@
|
||||
packages = {
|
||||
clan-cli = pkgs.python3.pkgs.callPackage ./default.nix {
|
||||
inherit (inputs) nixpkgs;
|
||||
# inherit (inputs) democlan;
|
||||
inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) deal;
|
||||
#inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) schemathesis;
|
||||
clan-core-path = clanCoreWithVendoredDeps;
|
||||
};
|
||||
default = self'.packages.clan-cli;
|
||||
|
||||
@@ -24,7 +24,6 @@ norecursedirs = "tests/helpers"
|
||||
markers = ["impure", "with_core"]
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ["deal.mypy"]
|
||||
python_version = "3.11"
|
||||
warn_redundant_casts = true
|
||||
disallow_untyped_calls = true
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import deal
|
||||
|
||||
from clan_cli import nix
|
||||
|
||||
|
||||
@deal.cases(nix.nix_shell)
|
||||
def test_nix_shell(case: deal.TestCase) -> None:
|
||||
case()
|
||||
Reference in New Issue
Block a user