style: autoformat src and tests

Repository-wide formatting pass over src/ and tests/: sorted imports and
__all__ entries, dropped redundant `# -*- coding: utf-8 -*-` headers,
unquoted forward-reference annotations (safe under
`from __future__ import annotations`), merged nested `with` statements,
moved `Iterable` and friends from `typing` to `collections.abc`, and
removed `# noqa: F401` markers that no longer suppress anything.

No behavioural changes. Unit and integration suites show the same four
pre-existing failures before and after the pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5 committed 2026-07-27 15:17:35 +02:00
1 parent f1517963a5
commit 8294bce436
185 files changed
+378 -445

No files matched your search

+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Integration tests for the `pkgmgr branch` CLI wiring.
@@ -16,8 +15,8 @@ from __future__ import annotations
import unittest
from unittest.mock import patch
from pkgmgr.cli.parser import create_parser
from pkgmgr.cli.commands.branch import handle_branch
from pkgmgr.cli.parser import create_parser
class TestBranchCLI(unittest.TestCase):
@@ -11,8 +11,8 @@ from unittest.mock import patch
import yaml
from pkgmgr.core.config.load import load_config
from pkgmgr.cli.commands import config as config_cmd
from pkgmgr.core.config.load import load_config
class ConfigDefaultsIntegrationTest(unittest.TestCase):
-1
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import tempfile
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CLI integration tests for `pkgmgr mirror`.
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Integration test for mirror probing + provisioning after refactor.
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Integration tests for recursive capability resolution and installer shadowing.
@@ -17,7 +16,8 @@ import os
import shutil
import tempfile
import unittest
from typing import List, Sequence, Tuple
from collections.abc import Sequence
from typing import List, Tuple
from unittest.mock import patch
import pkgmgr.actions.install as install_mod
@@ -29,7 +29,6 @@ from pkgmgr.actions.install.installers.os_packages.arch_pkgbuild import (
)
from pkgmgr.actions.install.installers.python import PythonInstaller
InstallerSpec = Tuple[str, object]
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import annotations
@@ -42,7 +41,6 @@ class TestUpdateSilentContinues(unittest.TestCase):
pull_calls.append(repo["repository"])
if repo["repository"] == "repo-a":
raise SystemExit(2)
return None
def install_side_effect(selected_repos, *_args, **kwargs):
repo = selected_repos[0]
@@ -51,7 +49,6 @@ class TestUpdateSilentContinues(unittest.TestCase):
)
if repo["repository"] == "repo-b":
raise SystemExit(3)
return None
# Patch at the exact import locations used inside UpdateManager.run()
with (
@@ -14,7 +14,6 @@ from pkgmgr.actions.mirror.setup_cmd import setup_mirrors
from pkgmgr.actions.mirror.visibility_cmd import set_mirror_visibility
from pkgmgr.core.remote_provisioning.types import RepoSpec
Repository = Dict[str, Any]