forked from Mirror/pmbootstrap
ruff: run check --fix (MR 2252)
Get rid of unused imports and such Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
139c205424
commit
f2ca9c618e
38 changed files with 15 additions and 59 deletions
|
@ -3,7 +3,6 @@
|
|||
import fnmatch
|
||||
from pmb.helpers import logging
|
||||
import re
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.git
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.args
|
||||
|
|
|
@ -6,7 +6,6 @@ import pmb.build
|
|||
import pmb.chroot.apk
|
||||
import pmb.chroot.apk_static
|
||||
from pmb.core.arch import Arch
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.run
|
||||
import pmb.parse.apkindex
|
||||
from pmb.core import Chroot
|
||||
|
|
|
@ -18,7 +18,6 @@ import pmb.helpers.pmaports
|
|||
import pmb.helpers.repo
|
||||
import pmb.helpers.mount
|
||||
import pmb.helpers.package
|
||||
from pmb.meta import Cache
|
||||
import pmb.parse
|
||||
import pmb.parse.apkindex
|
||||
from pmb.helpers.exceptions import BuildFailedError
|
||||
|
|
|
@ -8,7 +8,7 @@ from typing import Any, Dict, Optional, Union
|
|||
import pmb.config
|
||||
import pmb.chroot.apk
|
||||
import pmb.helpers.pmaports
|
||||
from pmb.core import Chroot, ChrootType
|
||||
from pmb.core import Chroot
|
||||
from pmb.core.context import get_context
|
||||
from pmb.meta import Cache
|
||||
|
||||
|
|
|
@ -5,13 +5,11 @@ from pmb.core.pkgrepo import pkgrepo_default_path
|
|||
from pmb.helpers import logging
|
||||
from pathlib import Path
|
||||
import pmb.chroot
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.cli
|
||||
import pmb.parse
|
||||
import pmb.build
|
||||
|
||||
from pmb.core import Chroot
|
||||
from pmb.core.context import get_context
|
||||
|
||||
|
||||
def newapkbuild(folder, args_passed, force=False):
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import os
|
||||
import glob
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
from pmb.helpers import logging
|
||||
|
||||
import pmb.config
|
||||
import pmb.chroot.apk
|
||||
from pmb.core import Chroot
|
||||
from pmb.core.context import get_context
|
||||
from pmb.types import PmbArgs
|
||||
|
||||
|
||||
def list_chroot(suffix: Chroot, remove_prefix=True):
|
||||
|
|
|
@ -11,7 +11,7 @@ import pmb.chroot.binfmt
|
|||
import pmb.helpers.run
|
||||
import pmb.helpers.run_core
|
||||
from pmb.core import Chroot
|
||||
from pmb.types import Env, PathString, PmbArgs
|
||||
from pmb.types import Env, PathString
|
||||
|
||||
|
||||
def executables_absolute_path():
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
from typing import Generator, List, Optional
|
||||
from pathlib import Path, PosixPath, PurePosixPath
|
||||
from typing import List
|
||||
from pmb import commands
|
||||
from pmb.types import PathString
|
||||
from pmb.helpers import run
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
from typing import Any, Dict, List
|
||||
from pmb import commands, logging
|
||||
import pmb.helpers.repo
|
||||
import pmb.parse.apkindex
|
||||
|
|
|
@ -10,7 +10,7 @@ import glob
|
|||
import json
|
||||
import os
|
||||
import shutil
|
||||
from typing import Any, List, Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
import pmb.aportgen
|
||||
import pmb.config
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
|
||||
"""Global runtime context"""
|
||||
|
||||
from typing import List, Optional
|
||||
from pathlib import Path
|
||||
from pmb.core.arch import Arch
|
||||
from .config import Config
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# Copyright 2024 Caleb Connolly
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from argparse import Namespace
|
||||
import enum
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Tuple, TypedDict, Union
|
||||
from typing import List
|
||||
|
||||
from pmb.core.chroot import ChrootType
|
||||
from pmb.types import PathString
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import glob
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Generator, List, Optional, Tuple
|
||||
from typing import Dict, Generator, List, Optional, Tuple
|
||||
|
||||
import pmb.config
|
||||
from pmb.core.context import get_context
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import pmb.chroot.apk
|
||||
import pmb.config
|
||||
import pmb.config.pmaports
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.mount
|
||||
import pmb.helpers.args
|
||||
from pmb.helpers.mount import mount_device_rootfs
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from typing import Dict
|
||||
from pmb.parse.deviceinfo import Deviceinfo
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.flasher
|
||||
import pmb.chroot.initfs
|
||||
import pmb.helpers.args
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
# Copyright 2023 Johannes Marbach, Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import List, Sequence
|
||||
|
||||
import pmb.chroot
|
||||
import pmb.config.pmaports
|
||||
from pmb.core.arch import Arch
|
||||
from pmb.types import PathString, PmbArgs
|
||||
from pmb.types import PathString
|
||||
import pmb.helpers.cli
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.run_core
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from argparse import Namespace
|
||||
import copy
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import pmb.config
|
||||
from pmb.core.context import Context
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path
|
||||
|
|
|
@ -8,7 +8,6 @@ import readline
|
|||
import sys
|
||||
|
||||
import pmb.config
|
||||
from pmb.types import PmbArgs
|
||||
from pmb.core.context import get_context
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from pmb.core.context import get_context
|
||||
from pmb.core.pkgrepo import pkgrepo_glob_one, pkgrepo_iglob
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,9 @@ import configparser
|
|||
from pathlib import Path
|
||||
from typing import Dict
|
||||
from pmb.core.context import get_context
|
||||
from pmb.core.context import Context
|
||||
from pmb.core.pkgrepo import pkgrepo_path
|
||||
from pmb.helpers import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pmb.build
|
||||
import pmb.chroot.apk
|
||||
|
|
|
@ -9,7 +9,6 @@ import shutil
|
|||
import urllib.request
|
||||
|
||||
from pmb.core.context import get_context
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.run
|
||||
|
||||
def cache_file(prefix: str, url: str) -> Path:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# Copyright 2023 Danct12 <danct12@disroot.org>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Sequence
|
||||
from pmb.core.chroot import Chroot
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs, pkgrepo_names, pkgrepo_relative_path
|
||||
|
@ -10,7 +9,6 @@ import os
|
|||
import pmb.chroot
|
||||
import pmb.chroot.apk
|
||||
import pmb.build
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.pmaports
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import os
|
||||
from pathlib import Path, PurePath
|
||||
from typing import List
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers
|
||||
from pmb.core import Chroot
|
||||
import pmb.helpers.run
|
||||
|
|
|
@ -14,7 +14,6 @@ import pmb.helpers.pmaports
|
|||
import pmb.helpers.run
|
||||
from typing import Dict, Any
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
def folder_size(path: Path):
|
||||
|
|
|
@ -6,7 +6,6 @@ See also:
|
|||
- pmb/helpers/repo.py (work with binary package repos)
|
||||
- pmb/helpers/package.py (work with both)
|
||||
"""
|
||||
import glob
|
||||
from pmb.core.context import get_context
|
||||
from pmb.core.arch import Arch
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs
|
||||
|
|
|
@ -14,11 +14,10 @@ from pmb.core.arch import Arch
|
|||
from pmb.core.pkgrepo import pkgrepo_names
|
||||
from pmb.helpers import logging
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Set
|
||||
from typing import List, Optional
|
||||
|
||||
import pmb.config.pmaports
|
||||
from pmb.meta import Cache
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.http
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.other
|
||||
|
|
|
@ -5,8 +5,8 @@ from pathlib import Path
|
|||
import subprocess
|
||||
from pmb.core.arch import Arch
|
||||
import pmb.helpers.run_core
|
||||
from typing import Any, Dict, List, Optional, Sequence
|
||||
from pmb.types import Env, PathString, PmbArgs
|
||||
from typing import Optional, Sequence
|
||||
from pmb.types import Env, PathString
|
||||
|
||||
|
||||
def user(cmd: Sequence[PathString], working_dir: Optional[Path] = None, output: str = "log", output_return: bool = False,
|
||||
|
|
|
@ -13,7 +13,7 @@ import subprocess
|
|||
import sys
|
||||
import threading
|
||||
import time
|
||||
from typing import Dict, Optional, Sequence
|
||||
from typing import Optional, Sequence
|
||||
import pmb.helpers.run
|
||||
|
||||
"""For a detailed description of all output modes, read the description of
|
||||
|
|
|
@ -7,7 +7,6 @@ import pmb.helpers.git
|
|||
from pmb.core import Config
|
||||
from pmb.types import PmbArgs
|
||||
from pmb.core.context import get_context
|
||||
from typing import List, Tuple
|
||||
|
||||
|
||||
def print_status_line(key: str, value: str):
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright 2023 Clayton Craft
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import os
|
||||
import glob
|
||||
from pmb.core.context import get_context
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
import pmb.helpers.pmaports
|
||||
import pmb.helpers.package
|
||||
|
|
|
@ -7,7 +7,7 @@ import re
|
|||
import glob
|
||||
import shlex
|
||||
import sys
|
||||
from typing import Dict, List, Optional, Sequence, TypedDict
|
||||
from typing import Dict, List, Optional, Sequence
|
||||
from pathlib import Path
|
||||
|
||||
import pmb.build
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
from typing import Optional
|
||||
from pmb.helpers import logging
|
||||
import os
|
||||
import glob
|
||||
from pathlib import Path
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.mount
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import glob
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
from typing import List
|
||||
from pmb.helpers import logging
|
||||
import os
|
||||
import time
|
||||
|
||||
from pmb.types import PathString, PmbArgs
|
||||
from pmb.types import PathString
|
||||
import pmb.helpers.mount
|
||||
import pmb.helpers.run
|
||||
import pmb.chroot
|
||||
|
|
|
@ -10,7 +10,6 @@ from collections import OrderedDict
|
|||
|
||||
import pmb.config
|
||||
from pmb.meta import Cache
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.devices
|
||||
import pmb.parse.version
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import collections
|
||||
from typing import Any, Dict, List, Optional, Sequence, Union
|
||||
from typing import Any, Dict, List, Optional, Sequence
|
||||
from pmb.core.arch import Arch
|
||||
from pmb.core.context import get_context
|
||||
from pmb.helpers import logging
|
||||
|
|
|
@ -4,7 +4,6 @@ import os
|
|||
from pmb.core.context import get_context
|
||||
from pmb.helpers import logging
|
||||
from pathlib import Path
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.helpers.run
|
||||
import pmb.chroot
|
||||
import pmb.chroot.other
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from typing import Dict, List, Sequence, Set
|
||||
from pmb.helpers import logging
|
||||
import pmb.chroot
|
||||
import pmb.chroot.apk
|
||||
|
|
|
@ -7,7 +7,6 @@ import os
|
|||
|
||||
import pmb.build
|
||||
import pmb.config
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.parse
|
||||
import pmb.helpers.pmaports
|
||||
from pmb.helpers.exceptions import NonBugError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue