forked from Mirror/pmbootstrap
pmb: Use explicit re-exports (MR 2545)
See https://docs.astral.sh/ruff/rules/unused-import
This commit is contained in:
parent
0620232819
commit
bdcc188f05
10 changed files with 72 additions and 49 deletions
|
@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
|||
from . import config
|
||||
from . import parse
|
||||
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 mount
|
||||
from .helpers import other
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.build.init import init, init_abuild_minimal, init_compiler
|
||||
from pmb.build.envkernel import package_kernel
|
||||
from pmb.build.newapkbuild import newapkbuild
|
||||
from pmb.build.other import copy_to_buildpath, get_status, index_repo
|
||||
from .backend import mount_pmaports
|
||||
from pmb.build._package import (
|
||||
BootstrapStage,
|
||||
packages,
|
||||
output_path,
|
||||
BuildQueueItem,
|
||||
get_apkbuild,
|
||||
get_depends,
|
||||
from pmb.build.init import (
|
||||
init as init,
|
||||
init_abuild_minimal as init_abuild_minimal,
|
||||
init_compiler as init_compiler,
|
||||
)
|
||||
from pmb.build.envkernel import package_kernel as package_kernel
|
||||
from pmb.build.newapkbuild import newapkbuild as newapkbuild
|
||||
from pmb.build.other import (
|
||||
copy_to_buildpath as copy_to_buildpath,
|
||||
get_status as get_status,
|
||||
index_repo as index_repo,
|
||||
)
|
||||
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,
|
||||
)
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.chroot.init import init, init_keys, UsrMerge
|
||||
from pmb.chroot.mount import mount, mount_native_into_foreign, remove_mnt_pmbootstrap
|
||||
from pmb.chroot.run import root, rootm, user, userm, exists as user_exists
|
||||
from pmb.chroot.shutdown import shutdown
|
||||
from pmb.chroot.zap import zap, del_chroot
|
||||
from pmb.chroot.init import init as init, init_keys as init_keys, UsrMerge as UsrMerge
|
||||
from pmb.chroot.mount import (
|
||||
mount as mount,
|
||||
mount_native_into_foreign as mount_native_into_foreign,
|
||||
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
|
||||
|
|
|
@ -11,11 +11,11 @@ from collections.abc import Sequence
|
|||
#
|
||||
# FIXME (#2324): this sucks, we should re-organise this and not rely on "lifting"
|
||||
# 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.other import is_systemd_selected
|
||||
from .init import require_programs
|
||||
from . import workdir
|
||||
from pmb.config.other import is_systemd_selected as is_systemd_selected
|
||||
from .init import require_programs as require_programs
|
||||
from . import workdir as workdir
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 2024 Caleb Connolly
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from .chroot import Chroot, ChrootType
|
||||
from .context import Context
|
||||
from .config import Config
|
||||
from .chroot import Chroot as Chroot, ChrootType as ChrootType
|
||||
from .context import Context as Context
|
||||
from .config import Config as Config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.export.frontend import frontend
|
||||
from pmb.export.odin import odin
|
||||
from pmb.export.symlinks import symlinks
|
||||
from pmb.export.frontend import frontend as frontend
|
||||
from pmb.export.odin import odin as odin
|
||||
from pmb.export.symlinks import symlinks as symlinks
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.flasher.init import init
|
||||
from pmb.flasher.init import install_depends
|
||||
from pmb.flasher.run import run
|
||||
from pmb.flasher.run import check_partition_blacklist
|
||||
from pmb.flasher.variables import variables
|
||||
from pmb.flasher.init import init as init
|
||||
from pmb.flasher.init import install_depends as install_depends
|
||||
from pmb.flasher.run import run as run
|
||||
from pmb.flasher.run import check_partition_blacklist as check_partition_blacklist
|
||||
from pmb.flasher.variables import variables as variables
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.install._install import install
|
||||
from pmb.install._install import get_kernel_package
|
||||
from pmb.install.partition import partition
|
||||
from pmb.install.partition import partition_cgpt
|
||||
from pmb.install.format import format
|
||||
from pmb.install.format import get_root_filesystem
|
||||
from pmb.install.partition import partitions_mount
|
||||
from pmb.install._install import install as install
|
||||
from pmb.install._install import get_kernel_package as get_kernel_package
|
||||
from pmb.install.partition import partition as partition
|
||||
from pmb.install.partition import partition_cgpt as partition_cgpt
|
||||
from pmb.install.format import format as format
|
||||
from pmb.install.format import get_root_filesystem as get_root_filesystem
|
||||
from pmb.install.partition import partitions_mount as partitions_mount
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.parse.arguments import arguments, arguments_install, arguments_flasher, get_parser
|
||||
from pmb.parse._apkbuild import apkbuild
|
||||
from pmb.parse._apkbuild import function_body
|
||||
from pmb.parse.binfmt_info import binfmt_info
|
||||
from pmb.parse.deviceinfo import deviceinfo
|
||||
from pmb.parse.kconfig import check
|
||||
from pmb.parse.bootimg import bootimg
|
||||
from pmb.parse.cpuinfo import arm_big_little_first_group_ncpus
|
||||
from pmb.parse.arguments import (
|
||||
arguments as arguments,
|
||||
arguments_install as arguments_install,
|
||||
arguments_flasher as arguments_flasher,
|
||||
get_parser as get_parser,
|
||||
)
|
||||
from pmb.parse._apkbuild import apkbuild as apkbuild
|
||||
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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Copyright 2023 Pablo Castellano
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pmb.qemu.run import run
|
||||
from pmb.qemu.run import run as run
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue