]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix formatting 2627/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 14 Apr 2024 15:14:03 +0000 (17:14 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 14 Apr 2024 15:14:03 +0000 (17:14 +0200)
We don't put whitespace between function keyword arguments and their
values.

tests/test_json.py

index 5e2203731044aae55ac18a62bc84a9807d5908dc..e503db04675da233599eb2e21aae54d6bfb15388 100644 (file)
@@ -352,152 +352,152 @@ def test_config() -> None:
     )
 
     args = Config(
-        acl =  True,
-        architecture = Architecture.ia64,
-        autologin = False,
-        base_trees = [Path("/hello/world")],
-        bios_bootloader = BiosBootloader.none,
-        bootable = ConfigFeature.disabled,
-        bootloader = Bootloader.grub,
-        build_dir = None,
-        build_packages =  ["pkg1", "pkg2"],
-        build_scripts =  [Path("/path/to/buildscript")],
-        build_sources = [ConfigTree(Path("/qux"), Path("/frob"))],
-        build_sources_ephemeral = True,
-        cache_dir = Path("/is/this/the/cachedir"),
-        cacheonly = Cacheonly.always,
-        checksum =  False,
-        clean_package_metadata = ConfigFeature.auto,
-        clean_scripts = [Path("/clean")],
-        compress_level = 3,
-        compress_output = Compression.bz2,
-        configure_scripts = [Path("/configure")],
-        credentials =  {"credkey": "credval"},
-        dependencies = ("dep1",),
-        distribution = Distribution.fedora,
-        environment = {"foo": "foo", "BAR": "BAR", "Qux": "Qux"},
-        environment_files = [],
-        ephemeral = True,
-        extra_search_paths = [],
-        extra_trees = [],
-        finalize_scripts = [],
-        forward_journal = Path("/mkosi.journal"),
-        hostname = None,
-        vmm = Vmm.qemu,
-        image = "default",
-        image_id = "myimage",
-        image_version = "5",
-        images = ("default", "initrd"),
-        include = [],
-        incremental = False,
-        initrd_include = [Path("/foo/bar"),],
-        initrd_packages = ["clevis"],
-        initrd_volatile_packages = ["abc"],
-        initrds = [Path("/efi/initrd1"), Path("/efi/initrd2")],
+        acl=True,
+        architecture=Architecture.ia64,
+        autologin=False,
+        base_trees=[Path("/hello/world")],
+        bios_bootloader=BiosBootloader.none,
+        bootable=ConfigFeature.disabled,
+        bootloader=Bootloader.grub,
+        build_dir=None,
+        build_packages=["pkg1", "pkg2"],
+        build_scripts=[Path("/path/to/buildscript")],
+        build_sources=[ConfigTree(Path("/qux"), Path("/frob"))],
+        build_sources_ephemeral=True,
+        cache_dir=Path("/is/this/the/cachedir"),
+        cacheonly=Cacheonly.always,
+        checksum= False,
+        clean_package_metadata=ConfigFeature.auto,
+        clean_scripts=[Path("/clean")],
+        compress_level=3,
+        compress_output=Compression.bz2,
+        configure_scripts=[Path("/configure")],
+        credentials= {"credkey": "credval"},
+        dependencies=("dep1",),
+        distribution=Distribution.fedora,
+        environment={"foo": "foo", "BAR": "BAR", "Qux": "Qux"},
+        environment_files=[],
+        ephemeral=True,
+        extra_search_paths=[],
+        extra_trees=[],
+        finalize_scripts=[],
+        forward_journal=Path("/mkosi.journal"),
+        hostname=None,
+        vmm=Vmm.qemu,
+        image="default",
+        image_id="myimage",
+        image_version="5",
+        images=("default", "initrd"),
+        include=[],
+        incremental=False,
+        initrd_include=[Path("/foo/bar"),],
+        initrd_packages=["clevis"],
+        initrd_volatile_packages=["abc"],
+        initrds=[Path("/efi/initrd1"), Path("/efi/initrd2")],
         microcode_host=True,
-        kernel_command_line = [],
-        kernel_command_line_extra = ["look", "im", "on", "the", "kernel", "command", "line"],
-        kernel_modules_exclude = ["nvidia"],
-        kernel_modules_include = ["loop"],
-        kernel_modules_include_host = True,
-        kernel_modules_initrd = True,
-        kernel_modules_initrd_exclude = [],
-        kernel_modules_initrd_include = [],
-        kernel_modules_initrd_include_host = True,
-        key = None,
-        keymap = "wow, so much keymap",
-        local_mirror = None,
-        locale = "en_C.UTF-8",
-        locale_messages = "",
-        machine = "machine",
-        make_initrd = False,
-        manifest_format = [ManifestFormat.json, ManifestFormat.changelog],
-        minimum_version = GenericVersion("123"),
-        mirror = None,
-        nspawn_settings = None,
-        output = "outfile",
-        output_dir = Path("/your/output/here"),
-        output_format = OutputFormat.uki,
-        overlay = True,
-        package_cache_dir = Path("/a/b/c"),
-        package_directories = [],
-        package_manager_trees = [ConfigTree(Path("/foo/bar"), None)],
-        packages = [],
-        passphrase = None,
-        postinst_scripts = [Path("/bar/qux")],
-        prepare_scripts = [Path("/run/foo")],
-        profile = "profile",
-        proxy_client_certificate = Path("/my/client/cert"),
-        proxy_client_key = Path("/my/client/key"),
-        proxy_exclude = ["www.example.com"],
-        proxy_peer_certificate = Path("/my/peer/cert"),
-        proxy_url = "https://my/proxy",
-        qemu_args = [],
-        qemu_cdrom = False,
-        qemu_drives = [QemuDrive("abc", 200, Path("/foo/bar"), "abc,qed"), QemuDrive("abc", 200, None, "")],
-        qemu_firmware = QemuFirmware.linux,
-        qemu_firmware_variables = Path("/foo/bar"),
-        qemu_gui = True,
-        qemu_kernel = None,
-        qemu_kvm = ConfigFeature.auto,
-        qemu_mem = 123,
-        qemu_smp = 2,
-        qemu_swtpm = ConfigFeature.auto,
-        qemu_vsock = ConfigFeature.enabled,
-        qemu_vsock_cid = QemuVsockCID.hash,
-        release = "53",
-        remove_files = [],
-        remove_packages = ["all"],
-        repart_dirs = [],
-        repart_offline = True,
-        repositories = [],
-        repository_key_check = False,
-        root_password = ("test1234", False),
-        root_shell = "/bin/tcsh",
-        runtime_build_sources = True,
-        runtime_network = Network.interface,
-        runtime_scratch = ConfigFeature.enabled,
-        runtime_size = 8589934592,
-        runtime_trees = [ConfigTree(Path("/foo/bar"), Path("/baz")), ConfigTree(Path("/bar/baz"), Path("/qux"))],
-        sector_size = None,
-        secure_boot = True,
-        secure_boot_auto_enroll = True,
-        secure_boot_certificate = None,
-        secure_boot_key = Path("/path/to/keyfile"),
-        secure_boot_key_source = KeySource(type=KeySource.Type.file),
-        secure_boot_sign_tool = SecureBootSignTool.pesign,
-        seed = uuid.UUID("7496d7d8-7f08-4a2b-96c6-ec8c43791b60"),
-        selinux_relabel = ConfigFeature.disabled,
-        shim_bootloader = ShimBootloader.none,
-        sign = False,
-        sign_expected_pcr = ConfigFeature.disabled,
-        skeleton_trees = [ConfigTree(Path("/foo/bar"), Path("/")), ConfigTree(Path("/bar/baz"), Path("/qux"))],
-        source_date_epoch = 12345,
-        split_artifacts = True,
-        ssh = False,
-        ssh_certificate = Path("/path/to/cert"),
-        ssh_key = None,
-        sync_scripts = [Path("/sync")],
-        timezone = None,
-        tools_tree = None,
-        tools_tree_certificates = True,
-        tools_tree_distribution = None,
-        tools_tree_mirror = None,
-        tools_tree_package_manager_trees = [ConfigTree(Path("/a/b/c"), Path("/"))],
-        tools_tree_packages = [],
-        tools_tree_release = None,
-        tools_tree_repositories = ["abc"],
-        unified_kernel_images = ConfigFeature.auto,
-        use_subvolumes = ConfigFeature.auto,
-        verity_certificate = Path("/path/to/cert"),
-        verity_key = None,
-        verity_key_source = KeySource(type=KeySource.Type.file),
-        volatile_packages = ["abc"],
-        with_docs = True,
-        with_network = False,
-        with_recommends = True,
-        with_tests =  True,
-        workspace_dir = Path("/cwd"),
+        kernel_command_line=[],
+        kernel_command_line_extra=["look", "im", "on", "the", "kernel", "command", "line"],
+        kernel_modules_exclude=["nvidia"],
+        kernel_modules_include=["loop"],
+        kernel_modules_include_host=True,
+        kernel_modules_initrd=True,
+        kernel_modules_initrd_exclude=[],
+        kernel_modules_initrd_include=[],
+        kernel_modules_initrd_include_host=True,
+        key=None,
+        keymap="wow, so much keymap",
+        local_mirror=None,
+        locale="en_C.UTF-8",
+        locale_messages="",
+        machine="machine",
+        make_initrd=False,
+        manifest_format=[ManifestFormat.json, ManifestFormat.changelog],
+        minimum_version=GenericVersion("123"),
+        mirror=None,
+        nspawn_settings=None,
+        output="outfile",
+        output_dir=Path("/your/output/here"),
+        output_format=OutputFormat.uki,
+        overlay=True,
+        package_cache_dir=Path("/a/b/c"),
+        package_directories=[],
+        package_manager_trees=[ConfigTree(Path("/foo/bar"), None)],
+        packages=[],
+        passphrase=None,
+        postinst_scripts=[Path("/bar/qux")],
+        prepare_scripts=[Path("/run/foo")],
+        profile="profile",
+        proxy_client_certificate=Path("/my/client/cert"),
+        proxy_client_key=Path("/my/client/key"),
+        proxy_exclude=["www.example.com"],
+        proxy_peer_certificate=Path("/my/peer/cert"),
+        proxy_url="https://my/proxy",
+        qemu_args=[],
+        qemu_cdrom=False,
+        qemu_drives=[QemuDrive("abc", 200, Path("/foo/bar"), "abc,qed"), QemuDrive("abc", 200, None, "")],
+        qemu_firmware=QemuFirmware.linux,
+        qemu_firmware_variables=Path("/foo/bar"),
+        qemu_gui=True,
+        qemu_kernel=None,
+        qemu_kvm=ConfigFeature.auto,
+        qemu_mem=123,
+        qemu_smp=2,
+        qemu_swtpm=ConfigFeature.auto,
+        qemu_vsock=ConfigFeature.enabled,
+        qemu_vsock_cid=QemuVsockCID.hash,
+        release="53",
+        remove_files=[],
+        remove_packages=["all"],
+        repart_dirs=[],
+        repart_offline=True,
+        repositories=[],
+        repository_key_check=False,
+        root_password=("test1234", False),
+        root_shell="/bin/tcsh",
+        runtime_build_sources=True,
+        runtime_network=Network.interface,
+        runtime_scratch=ConfigFeature.enabled,
+        runtime_size=8589934592,
+        runtime_trees=[ConfigTree(Path("/foo/bar"), Path("/baz")), ConfigTree(Path("/bar/baz"), Path("/qux"))],
+        sector_size=None,
+        secure_boot=True,
+        secure_boot_auto_enroll=True,
+        secure_boot_certificate=None,
+        secure_boot_key=Path("/path/to/keyfile"),
+        secure_boot_key_source=KeySource(type=KeySource.Type.file),
+        secure_boot_sign_tool=SecureBootSignTool.pesign,
+        seed=uuid.UUID("7496d7d8-7f08-4a2b-96c6-ec8c43791b60"),
+        selinux_relabel=ConfigFeature.disabled,
+        shim_bootloader=ShimBootloader.none,
+        sign=False,
+        sign_expected_pcr=ConfigFeature.disabled,
+        skeleton_trees=[ConfigTree(Path("/foo/bar"), Path("/")), ConfigTree(Path("/bar/baz"), Path("/qux"))],
+        source_date_epoch=12345,
+        split_artifacts=True,
+        ssh=False,
+        ssh_certificate=Path("/path/to/cert"),
+        ssh_key=None,
+        sync_scripts=[Path("/sync")],
+        timezone=None,
+        tools_tree=None,
+        tools_tree_certificates=True,
+        tools_tree_distribution=None,
+        tools_tree_mirror=None,
+        tools_tree_package_manager_trees=[ConfigTree(Path("/a/b/c"), Path("/"))],
+        tools_tree_packages=[],
+        tools_tree_release=None,
+        tools_tree_repositories=["abc"],
+        unified_kernel_images=ConfigFeature.auto,
+        use_subvolumes=ConfigFeature.auto,
+        verity_certificate=Path("/path/to/cert"),
+        verity_key=None,
+        verity_key_source=KeySource(type=KeySource.Type.file),
+        volatile_packages=["abc"],
+        with_docs=True,
+        with_network=False,
+        with_recommends=True,
+        with_tests= True,
+        workspace_dir=Path("/cwd"),
     )
 
     assert args.to_json() == dump.rstrip()