diff --git a/.flake8 b/.flake8 index b4e641a4..0dab6675 100644 --- a/.flake8 +++ b/.flake8 @@ -1,11 +1,11 @@ [flake8] count = True # Several of the following could be autofixed or improved by running the code through psf/black -ignore = E128,E722,W191,W503 +ignore = E722,W191,W503 max-complexity = 40 max-line-length = 220 show-source = True statistics = True builtins = _ -per-file-ignores = __init__.py:F401 +per-file-ignores = __init__.py:E128,F401 exclude = .git,__pycache__,build,docs,actions-runner diff --git a/.github/workflows/flake8.yaml b/.github/workflows/flake8.yaml index 039553d9..0227833b 100644 --- a/.github/workflows/flake8.yaml +++ b/.github/workflows/flake8.yaml @@ -1,5 +1,5 @@ on: [ push, pull_request ] -name: flake8 linting (4 ignores) +name: flake8 linting (3 ignores) jobs: flake8: runs-on: ubuntu-latest diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index a865b720..06b57918 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -174,8 +174,10 @@ class DeviceHandler(object): def get_unique_path_for_device(self, dev_path: Path) -> Optional[Path]: paths = Path('/dev/disk/by-id').glob('*') linked_targets = {p.resolve(): p for p in paths} - linked_wwn_targets = {p: linked_targets[p] for p in linked_targets - if p.name.startswith('wwn-') or p.name.startswith('nvme-eui.')} + linked_wwn_targets = { + p: linked_targets[p] for p in linked_targets + if p.name.startswith('wwn-') or p.name.startswith('nvme-eui.') + } if dev_path in linked_wwn_targets: return linked_wwn_targets[dev_path] diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 59356209..c34c2e79 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -345,7 +345,8 @@ class SysCommandWorker: class SysCommand: - def __init__(self, + def __init__( + self, cmd: Union[str, list[str]], callbacks: dict[str, Callable[[Any], Any]] = {}, start_callback: Optional[Callable[[Any], Any]] = None, diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 89382f70..daa668d8 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1512,8 +1512,7 @@ Exec = /bin/sh -c "{hook_command}" for user in users: self.user_create(user.username, user.password, user.groups, user.sudo) - def user_create(self, user: str, password: Optional[str] = None, groups: Optional[list[str]] = None, - sudo: bool = False) -> None: + def user_create(self, user: str, password: Optional[str] = None, groups: Optional[list[str]] = None, sudo: bool = False) -> None: if groups is None: groups = []