clan-cli: Fix regression in ruff linter, where linter rules got overriden by local pyproject.toml
clan-app: Fix ruff regression where linter rules got overriden by local pyproject.toml
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import argparse
|
||||
import logging
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_machines
|
||||
from clan_lib.errors import ClanError
|
||||
from clan_lib.machines.machines import Machine
|
||||
from clan_lib.flake import Flake
|
||||
from typing import TYPE_CHECKING
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .generate import Var
|
||||
|
||||
@@ -54,7 +54,8 @@ class Generator:
|
||||
|
||||
@cached_property
|
||||
def exists(self) -> bool:
|
||||
assert self.machine is not None and self._flake is not None
|
||||
assert self.machine is not None
|
||||
assert self._flake is not None
|
||||
return check_vars(self.machine, self._flake, generator_name=self.name)
|
||||
|
||||
@classmethod
|
||||
@@ -116,7 +117,8 @@ class Generator:
|
||||
return generators
|
||||
|
||||
def final_script(self) -> Path:
|
||||
assert self.machine is not None and self._flake is not None
|
||||
assert self.machine is not None
|
||||
assert self._flake is not None
|
||||
from clan_lib.machines.machines import Machine
|
||||
from clan_lib.nix import nix_test_store
|
||||
|
||||
@@ -131,7 +133,8 @@ class Generator:
|
||||
return output
|
||||
|
||||
def validation(self) -> str | None:
|
||||
assert self.machine is not None and self._flake is not None
|
||||
assert self.machine is not None
|
||||
assert self._flake is not None
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
machine = Machine(name=self.machine, flake=self._flake)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import io
|
||||
import logging
|
||||
import tarfile
|
||||
import subprocess
|
||||
import tarfile
|
||||
from collections.abc import Iterable
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
@@ -79,7 +79,7 @@ class SecretStore(StoreBase):
|
||||
return Path(self.entry_prefix) / self.rel_dir(generator, name)
|
||||
|
||||
def _run_pass(
|
||||
self, *args: str, input: bytes | None = None, check: bool = True
|
||||
self, *args: str, input: bytes | None = None, check: bool = True # noqa: A002
|
||||
) -> subprocess.CompletedProcess[bytes]:
|
||||
cmd = [self._pass_command, *args]
|
||||
# We need bytes support here, so we can not use clan cmd.
|
||||
@@ -88,8 +88,7 @@ class SecretStore(StoreBase):
|
||||
return subprocess.run(
|
||||
cmd,
|
||||
input=input,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
capture_output=True,
|
||||
check=check,
|
||||
)
|
||||
|
||||
@@ -152,7 +151,7 @@ class SecretStore(StoreBase):
|
||||
if not local_hash:
|
||||
return True
|
||||
|
||||
from clan_lib.cmd import RunOpts, Log
|
||||
from clan_lib.cmd import Log, RunOpts
|
||||
|
||||
remote_hash = host.run(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user