mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-15 06:55:48 +00:00
refactor: fix warnings and typos, cleanup code
This commit is contained in:
@ -34,9 +34,6 @@ from ahriman.models.worker import Worker
|
||||
class Updater(LazyLogging):
|
||||
"""
|
||||
updater handler interface
|
||||
|
||||
Attributes:
|
||||
split_method(Callable[[Iterable[Package]], list[list[Package]]]): method to split packages into chunks
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
|
@ -170,7 +170,7 @@ class Handler:
|
||||
# extract repository names first
|
||||
if (from_args := args.repository) is not None:
|
||||
repositories: Iterable[str] = [from_args]
|
||||
elif (from_filesystem := RepositoryPaths.known_repositories(root)):
|
||||
elif from_filesystem := RepositoryPaths.known_repositories(root):
|
||||
repositories = from_filesystem
|
||||
else: # try to read configuration now
|
||||
repositories = [configuration.get("repository", "name")]
|
||||
|
@ -344,7 +344,7 @@ class Sources(LazyLogging):
|
||||
str: HEAD commit hash
|
||||
"""
|
||||
# we might want to parse git files instead though
|
||||
return check_output("git", "rev-parse", ref_name, cwd=sources_dir)
|
||||
return check_output("git", "rev-parse", ref_name, cwd=sources_dir, logger=self.logger)
|
||||
|
||||
def move(self, pkgbuild_dir: Path, sources_dir: Path) -> None:
|
||||
"""
|
||||
|
@ -38,7 +38,7 @@ class Task(LazyLogging):
|
||||
archbuild_flags(list[str]): command flags for archbuild command
|
||||
architecture(str): repository architecture
|
||||
build_command(str): build command
|
||||
makechroootpkg_flags(list[str]): command flags for makechrootpkg command
|
||||
makechrootpkg_flags(list[str]): command flags for makechrootpkg command
|
||||
makepkg_flags(list[str]): command flags for makepkg command
|
||||
package(Package): package definitions
|
||||
paths(RepositoryPaths): repository paths instance
|
||||
|
@ -41,7 +41,7 @@ class Client:
|
||||
load client from settings
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unqiue identifier
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
report(bool): force enable or disable reporting
|
||||
|
||||
|
@ -276,8 +276,8 @@ class Tree:
|
||||
unprocessed = sorted(self.leaves, key=lambda leaf: leaf.package.base)
|
||||
while unprocessed:
|
||||
# pick one and append it to the most free partition and build chunk
|
||||
leaf = unprocessed.pop()
|
||||
chunk = [leaf]
|
||||
first_leaf = unprocessed.pop()
|
||||
chunk = [first_leaf]
|
||||
|
||||
while True: # python doesn't allow to use walrus operator to unpack tuples
|
||||
# get packages which depend on packages in chunk
|
||||
|
@ -46,7 +46,7 @@ class Result:
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
addded(Iterable[Package] | None, optional): initial list of successfully added packages
|
||||
added(Iterable[Package] | None, optional): initial list of successfully added packages
|
||||
(Default value = None)
|
||||
updated(Iterable[Package] | None, optional): initial list of successfully updated packages
|
||||
(Default value = None)
|
||||
|
Reference in New Issue
Block a user