pmb: Use explicit re-exports (MR 2545)

See https://docs.astral.sh/ruff/rules/unused-import
This commit is contained in:
Stefan Hansson 2025-02-04 16:21:59 +01:00 committed by Oliver Smith
parent 0620232819
commit bdcc188f05
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
10 changed files with 72 additions and 49 deletions

View file

@ -15,7 +15,7 @@ if TYPE_CHECKING:
from . import config from . import config
from . import parse from . import parse
from .config import init as config_init, require_programs from .config import init as config_init, require_programs
from .helpers import frontend from .helpers import frontend as frontend
from .helpers import logging from .helpers import logging
from .helpers import mount from .helpers import mount
from .helpers import other from .helpers import other

View file

@ -1,15 +1,23 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.build.init import init, init_abuild_minimal, init_compiler from pmb.build.init import (
from pmb.build.envkernel import package_kernel init as init,
from pmb.build.newapkbuild import newapkbuild init_abuild_minimal as init_abuild_minimal,
from pmb.build.other import copy_to_buildpath, get_status, index_repo init_compiler as init_compiler,
from .backend import mount_pmaports )
from pmb.build._package import ( from pmb.build.envkernel import package_kernel as package_kernel
BootstrapStage, from pmb.build.newapkbuild import newapkbuild as newapkbuild
packages, from pmb.build.other import (
output_path, copy_to_buildpath as copy_to_buildpath,
BuildQueueItem, get_status as get_status,
get_apkbuild, index_repo as index_repo,
get_depends, )
from .backend import mount_pmaports as mount_pmaports
from pmb.build._package import (
BootstrapStage as BootstrapStage,
packages as packages,
output_path as output_path,
BuildQueueItem as BuildQueueItem,
get_apkbuild as get_apkbuild,
get_depends as get_depends,
) )

View file

@ -1,7 +1,17 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.chroot.init import init, init_keys, UsrMerge from pmb.chroot.init import init as init, init_keys as init_keys, UsrMerge as UsrMerge
from pmb.chroot.mount import mount, mount_native_into_foreign, remove_mnt_pmbootstrap from pmb.chroot.mount import (
from pmb.chroot.run import root, rootm, user, userm, exists as user_exists mount as mount,
from pmb.chroot.shutdown import shutdown mount_native_into_foreign as mount_native_into_foreign,
from pmb.chroot.zap import zap, del_chroot remove_mnt_pmbootstrap as remove_mnt_pmbootstrap,
)
from pmb.chroot.run import (
root as root,
rootm as rootm,
user as user,
userm as userm,
exists as user_exists,
)
from pmb.chroot.shutdown import shutdown as shutdown
from pmb.chroot.zap import zap as zap, del_chroot as del_chroot

View file

@ -11,11 +11,11 @@ from collections.abc import Sequence
# #
# FIXME (#2324): this sucks, we should re-organise this and not rely on "lifting" # FIXME (#2324): this sucks, we should re-organise this and not rely on "lifting"
# this functions this way # this functions this way
from pmb.config.file import load, save, serialize from pmb.config.file import load as load, save as save, serialize as serialize
from pmb.config.sudo import which_sudo from pmb.config.sudo import which_sudo
from pmb.config.other import is_systemd_selected from pmb.config.other import is_systemd_selected as is_systemd_selected
from .init import require_programs from .init import require_programs as require_programs
from . import workdir from . import workdir as workdir
# #

View file

@ -1,6 +1,6 @@
# Copyright 2024 Caleb Connolly # Copyright 2024 Caleb Connolly
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from .chroot import Chroot, ChrootType from .chroot import Chroot as Chroot, ChrootType as ChrootType
from .context import Context from .context import Context as Context
from .config import Config from .config import Config as Config

View file

@ -1,5 +1,5 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.export.frontend import frontend from pmb.export.frontend import frontend as frontend
from pmb.export.odin import odin from pmb.export.odin import odin as odin
from pmb.export.symlinks import symlinks from pmb.export.symlinks import symlinks as symlinks

View file

@ -1,7 +1,7 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.flasher.init import init from pmb.flasher.init import init as init
from pmb.flasher.init import install_depends from pmb.flasher.init import install_depends as install_depends
from pmb.flasher.run import run from pmb.flasher.run import run as run
from pmb.flasher.run import check_partition_blacklist from pmb.flasher.run import check_partition_blacklist as check_partition_blacklist
from pmb.flasher.variables import variables from pmb.flasher.variables import variables as variables

View file

@ -1,9 +1,9 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.install._install import install from pmb.install._install import install as install
from pmb.install._install import get_kernel_package from pmb.install._install import get_kernel_package as get_kernel_package
from pmb.install.partition import partition from pmb.install.partition import partition as partition
from pmb.install.partition import partition_cgpt from pmb.install.partition import partition_cgpt as partition_cgpt
from pmb.install.format import format from pmb.install.format import format as format
from pmb.install.format import get_root_filesystem from pmb.install.format import get_root_filesystem as get_root_filesystem
from pmb.install.partition import partitions_mount from pmb.install.partition import partitions_mount as partitions_mount

View file

@ -1,10 +1,15 @@
# Copyright 2023 Oliver Smith # Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.parse.arguments import arguments, arguments_install, arguments_flasher, get_parser from pmb.parse.arguments import (
from pmb.parse._apkbuild import apkbuild arguments as arguments,
from pmb.parse._apkbuild import function_body arguments_install as arguments_install,
from pmb.parse.binfmt_info import binfmt_info arguments_flasher as arguments_flasher,
from pmb.parse.deviceinfo import deviceinfo get_parser as get_parser,
from pmb.parse.kconfig import check )
from pmb.parse.bootimg import bootimg from pmb.parse._apkbuild import apkbuild as apkbuild
from pmb.parse.cpuinfo import arm_big_little_first_group_ncpus from pmb.parse._apkbuild import function_body as function_body
from pmb.parse.binfmt_info import binfmt_info as binfmt_info
from pmb.parse.deviceinfo import deviceinfo as deviceinfo
from pmb.parse.kconfig import check as check
from pmb.parse.bootimg import bootimg as bootimg
from pmb.parse.cpuinfo import arm_big_little_first_group_ncpus as arm_big_little_first_group_ncpus

View file

@ -1,3 +1,3 @@
# Copyright 2023 Pablo Castellano # Copyright 2023 Pablo Castellano
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from pmb.qemu.run import run from pmb.qemu.run import run as run