diff --git a/checks/lib/container-driver/pyproject.toml b/checks/lib/container-driver/pyproject.toml index 8bfaa32f..088e026f 100644 --- a/checks/lib/container-driver/pyproject.toml +++ b/checks/lib/container-driver/pyproject.toml @@ -21,11 +21,6 @@ line-length = 88 select = ["E", "F", "I", "U", "N"] ignore = ["E501"] -[tool.black] -line-length = 88 -target-version = ['py39'] -include = '\.pyi?$' - [tool.mypy] python_version = "3.10" warn_redundant_casts = true diff --git a/formatter.nix b/formatter.nix index ee1c7510..89a68165 100644 --- a/formatter.nix +++ b/formatter.nix @@ -46,7 +46,7 @@ "-eucx" '' ${lib.getExe pkgs.ruff} --fix "$@" - ${lib.getExe pkgs.black} "$@" + ${lib.getExe pkgs.ruff} format "$@" '' "--" # this argument is ignored by bash ]; diff --git a/pkgs/clan-cli/clan_cli/vms/create.py b/pkgs/clan-cli/clan_cli/vms/create.py index 906b5f62..9417eaa5 100644 --- a/pkgs/clan-cli/clan_cli/vms/create.py +++ b/pkgs/clan-cli/clan_cli/vms/create.py @@ -153,27 +153,44 @@ class BuildVmTask(BaseTask): "console=tty0", ] qemu_command = [ - # fmt: off "qemu-kvm", - "-name", machine, - "-m", f'{vm_config["memorySize"]}M', - "-smp", str(vm_config["cores"]), - "-device", "virtio-rng-pci", - "-net", "nic,netdev=user.0,model=virtio", "-netdev", "user,id=user.0", - "-virtfs", "local,path=/nix/store,security_model=none,mount_tag=nix-store", - "-virtfs", f"local,path={xchg_dir},security_model=none,mount_tag=shared", - "-virtfs", f"local,path={xchg_dir},security_model=none,mount_tag=xchg", - "-virtfs", f"local,path={secrets_dir},security_model=none,mount_tag=secrets", - "-drive", f'cache=writeback,file={disk_img},format=raw,id=drive1,if=none,index=1,werror=report', - "-device", "virtio-blk-pci,bootindex=1,drive=drive1,serial=root", - "-device", "virtio-keyboard", - "-vga", "virtio", + "-name", + machine, + "-m", + f'{vm_config["memorySize"]}M', + "-smp", + str(vm_config["cores"]), + "-device", + "virtio-rng-pci", + "-net", + "nic,netdev=user.0,model=virtio", + "-netdev", + "user,id=user.0", + "-virtfs", + "local,path=/nix/store,security_model=none,mount_tag=nix-store", + "-virtfs", + f"local,path={xchg_dir},security_model=none,mount_tag=shared", + "-virtfs", + f"local,path={xchg_dir},security_model=none,mount_tag=xchg", + "-virtfs", + f"local,path={secrets_dir},security_model=none,mount_tag=secrets", + "-drive", + f"cache=writeback,file={disk_img},format=raw,id=drive1,if=none,index=1,werror=report", + "-device", + "virtio-blk-pci,bootindex=1,drive=drive1,serial=root", + "-device", + "virtio-keyboard", + "-vga", + "virtio", "-usb", - "-device", "usb-tablet,bus=usb-bus.0", - "-kernel", f'{vm_config["toplevel"]}/kernel', - "-initrd", vm_config["initrd"], - "-append", " ".join(cmdline), - # fmt: on + "-device", + "usb-tablet,bus=usb-bus.0", + "-kernel", + f'{vm_config["toplevel"]}/kernel', + "-initrd", + vm_config["initrd"], + "-append", + " ".join(cmdline), ] if not self.vm.graphics: qemu_command.append("-nographic") diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index 7e9fc09b..f402b713 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -58,25 +58,3 @@ line-length = 88 select = [ "E", "F", "I", "N"] ignore = [ "E501" ] - -[tool.black] -line-length = 88 -target-version = [ "py310" ] -include = "\\.pyi?$" -exclude = ''' -/( - \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - # The following are specific to Black, you probably don't want those. - | blib2to3 - | tests/data - | profiling -)/ -''' diff --git a/pyproject.toml b/pyproject.toml index 4c77b284..277094c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [tool.mypy] python_version = "3.10" +pretty = true warn_redundant_casts = true disallow_untyped_calls = true disallow_untyped_defs = true @@ -11,25 +12,3 @@ line-length = 88 select = [ "E", "F", "I", "U", "N"] ignore = [ "E501" ] - -[tool.black] -line-length = 88 -target-version = [ "py310" ] -include = "\\.pyi?$" -exclude = ''' -/( - \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - # The following are specific to Black, you probably don't want those. - | blib2to3 - | tests/data - | profiling -)/ -'''