mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
docs: improve class init docs
This commit is contained in:
parent
1d85a61cc4
commit
f81ebe6c3c
@ -84,8 +84,6 @@ Again, the most checks can be performed by `tox` command, though some additional
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
*args(Any): positional arguments
|
||||
**kwargs(Any): keyword arguments
|
||||
@ -93,6 +91,8 @@ Again, the most checks can be performed by `tox` command, though some additional
|
||||
self.instance_attribute = ""
|
||||
```
|
||||
|
||||
Note missing comment for the `__init__` method, which is the special case.
|
||||
|
||||
* Type annotations are the must, even for local functions. For the function argument `self` (for instance methods) and `cls` (for class methods) should not be annotated.
|
||||
* For collection types built-in classes must be used if possible (e.g. `dict` instead of `typing.Dict`, `tuple` instead of `typing.Tuple`). In case if built-in type is not available, but `collections.abc` provides interface, it must be used (e.g. `collections.abc.Awaitable` instead of `typing.Awaitable`, `collections.abc.Iterable` instead of `typing.Iterable`). For union classes, the bar operator (`|`) must be used (e.g. `float | int` instead of `typing.Union[float, int]`), which also includes `typing.Optional` (e.g. `str | None` instead of `Optional[str]`).
|
||||
* `classmethod` should (almost) always return `Self`. In case of mypy warning (e.g. if there is a branch in which function doesn't return the instance of `cls`) consider using `staticmethod` instead.
|
||||
|
@ -40,8 +40,6 @@ class ApplicationProperties(LazyLogging):
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, *, report: bool,
|
||||
refresh_pacman_database: PacmanSynchronization = PacmanSynchronization.Disabled) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -49,8 +49,6 @@ class UpdatesIterator(Iterator[list[str] | None]):
|
||||
|
||||
def __init__(self, application: Application, interval: int) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
application(Application): application instance
|
||||
interval(int): predefined interval for updates
|
||||
|
@ -37,8 +37,6 @@ class LocalUpdater(Updater):
|
||||
|
||||
def __init__(self, repository: Repository) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository(Repository): repository instance
|
||||
"""
|
||||
|
@ -43,8 +43,6 @@ class RemoteUpdater(Updater):
|
||||
|
||||
def __init__(self, workers: list[Worker], repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
workers(list[Worker]): worker identifiers
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
|
@ -66,8 +66,6 @@ class Lock(LazyLogging):
|
||||
|
||||
def __init__(self, args: argparse.Namespace, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
args(argparse.Namespace): command line args
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
|
@ -33,9 +33,7 @@ class _Context:
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor. Must not be used directly
|
||||
"""
|
||||
""""""
|
||||
self._content: dict[str, Any] = {}
|
||||
|
||||
def get(self, key: ContextKey[T] | type[T]) -> T:
|
||||
|
@ -49,8 +49,6 @@ class Pacman(LazyLogging):
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, *,
|
||||
refresh_database: PacmanSynchronization) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -45,8 +45,6 @@ class PacmanDatabase(SyncHttpClient):
|
||||
|
||||
def __init__(self, database: DB, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
database(DB): pyalpm database object
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -38,8 +38,6 @@ class Repo(LazyLogging):
|
||||
|
||||
def __init__(self, name: str, paths: RepositoryPaths, sign_args: list[str]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
name(str): repository name
|
||||
paths(RepositoryPaths): repository paths instance
|
||||
|
@ -38,8 +38,6 @@ class Auth(LazyLogging):
|
||||
|
||||
def __init__(self, configuration: Configuration, provider: AuthSettings = AuthSettings.Disabled) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
provider(AuthSettings, optional): authorization type definition (Default value = AuthSettings.Disabled)
|
||||
|
@ -37,8 +37,6 @@ class Mapping(Auth):
|
||||
def __init__(self, configuration: Configuration, database: SQLite,
|
||||
provider: AuthSettings = AuthSettings.Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
database(SQLite): database instance
|
||||
|
@ -43,8 +43,6 @@ class OAuth(Mapping):
|
||||
def __init__(self, configuration: Configuration, database: SQLite,
|
||||
provider: AuthSettings = AuthSettings.OAuth) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
database(SQLite): database instance
|
||||
|
@ -41,8 +41,6 @@ class PAM(Mapping):
|
||||
def __init__(self, configuration: Configuration, database: SQLite,
|
||||
provider: AuthSettings = AuthSettings.PAM) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
database(SQLite): database instance
|
||||
|
@ -45,8 +45,6 @@ class PackageArchive:
|
||||
|
||||
def __init__(self, root: Path, package: Package, pacman: Pacman, scan_paths: ScanPaths) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
root(Path): path to root filesystem
|
||||
package(Package): package descriptor
|
||||
|
@ -48,8 +48,6 @@ class Task(LazyLogging):
|
||||
def __init__(self, package: Package, configuration: Configuration, architecture: str,
|
||||
paths: RepositoryPaths) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package(Package): package definitions
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -71,8 +71,6 @@ class Configuration(configparser.RawConfigParser):
|
||||
|
||||
def __init__(self, allow_no_value: bool = False) -> None:
|
||||
"""
|
||||
default constructor. In the most cases must not be called directly
|
||||
|
||||
Args:
|
||||
allow_no_value(bool, optional): copies :class:`configparser.RawConfigParser` behaviour. In case if it is set
|
||||
to ``True``, the keys without values will be allowed (Default value = False)
|
||||
|
@ -41,8 +41,6 @@ class Validator(RootValidator):
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance used for extraction
|
||||
*args(Any): positional arguments to be passed to base validator
|
||||
|
@ -41,8 +41,6 @@ class Migrations(LazyLogging):
|
||||
|
||||
def __init__(self, connection: Connection, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
connection(Connection): database connection
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -41,8 +41,6 @@ class Operations(LazyLogging):
|
||||
|
||||
def __init__(self, path: Path, repository_id: RepositoryId, repository_paths: RepositoryPaths) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
path(Path): path to the database file
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
|
@ -59,8 +59,6 @@ class DistributedSystem(Trigger, WebClient):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -34,8 +34,6 @@ class WorkerTrigger(DistributedSystem):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -36,8 +36,6 @@ class WorkersCache(LazyLogging):
|
||||
|
||||
def __init__(self, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
"""
|
||||
|
@ -33,8 +33,6 @@ class BuildError(RuntimeError):
|
||||
|
||||
def __init__(self, package_base: str, stderr: str | None = None) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package_base(str): package base raised exception
|
||||
stderr(str | None, optional): stderr of the process if available (Default value = None)
|
||||
@ -67,8 +65,6 @@ class CalledProcessError(subprocess.CalledProcessError):
|
||||
|
||||
def __init__(self, status_code: int, process: list[str], stderr: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
status_code(int): process return code
|
||||
process(list[str]): process argument list
|
||||
@ -94,9 +90,7 @@ class DuplicateRunError(RuntimeError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
RuntimeError.__init__(
|
||||
self, "Another application instance is run. This error can be suppressed by using --force flag.")
|
||||
|
||||
@ -119,9 +113,7 @@ class GitRemoteError(RuntimeError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
RuntimeError.__init__(self, "Git remote failed")
|
||||
|
||||
|
||||
@ -132,8 +124,6 @@ class InitializeError(RuntimeError):
|
||||
|
||||
def __init__(self, details: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
details(str): details of the exception
|
||||
"""
|
||||
@ -147,8 +137,6 @@ class MigrationError(RuntimeError):
|
||||
|
||||
def __init__(self, details: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
details(str): error details
|
||||
"""
|
||||
@ -162,8 +150,6 @@ class MissingArchitectureError(ValueError):
|
||||
|
||||
def __init__(self, command: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
command(str): command name which throws exception
|
||||
"""
|
||||
@ -177,8 +163,6 @@ class MultipleArchitecturesError(ValueError):
|
||||
|
||||
def __init__(self, command: str, repositories: list[RepositoryId] | None = None) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
command(str): command name which throws exception
|
||||
repositories(list[RepositoryId] | None, optional): found repository list (Default value = None)
|
||||
@ -196,8 +180,6 @@ class OptionError(ValueError):
|
||||
|
||||
def __init__(self, value: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
value(Any): option value
|
||||
"""
|
||||
@ -211,8 +193,6 @@ class PackageInfoError(RuntimeError):
|
||||
|
||||
def __init__(self, details: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
details(Any): error details
|
||||
"""
|
||||
@ -226,8 +206,6 @@ class PacmanError(RuntimeError):
|
||||
|
||||
def __init__(self, details: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
details(Any): error details
|
||||
"""
|
||||
@ -241,8 +219,6 @@ class PathError(ValueError):
|
||||
|
||||
def __init__(self, path: Path, root: Path) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
path(Path): path which raised an exception
|
||||
root(Path): repository root (i.e. ahriman home)
|
||||
@ -257,8 +233,6 @@ class PasswordError(ValueError):
|
||||
|
||||
def __init__(self, details: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
details(Any); error details
|
||||
"""
|
||||
@ -272,8 +246,6 @@ class PartitionError(RuntimeError):
|
||||
|
||||
def __init__(self, count: int) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
count(int): count of partitions
|
||||
"""
|
||||
@ -286,9 +258,7 @@ class PkgbuildGeneratorError(RuntimeError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
RuntimeError.__init__(self, "Could not generate package")
|
||||
|
||||
|
||||
@ -298,9 +268,7 @@ class ReportError(RuntimeError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
RuntimeError.__init__(self, "Report failed")
|
||||
|
||||
|
||||
@ -310,9 +278,7 @@ class SynchronizationError(RuntimeError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
RuntimeError.__init__(self, "Sync failed")
|
||||
|
||||
|
||||
@ -323,8 +289,6 @@ class UnknownPackageError(ValueError):
|
||||
|
||||
def __init__(self, package_base: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package_base(str): package base name
|
||||
"""
|
||||
@ -338,8 +302,6 @@ class UnsafeRunError(RuntimeError):
|
||||
|
||||
def __init__(self, current_uid: int, root_uid: int) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
current_uid(int): current user ID
|
||||
root_uid(int): ID of the owner of root directory
|
||||
|
@ -33,8 +33,6 @@ class AurPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, package: AURPackage) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package(AURPackage): AUR package description
|
||||
"""
|
||||
|
@ -28,8 +28,6 @@ class BuildPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, package: Package, is_success: bool, use_utf: bool) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package(Package): built package
|
||||
is_success(bool): ``True`` in case if build has success status and ``False`` otherwise
|
||||
|
@ -32,8 +32,6 @@ class ChangesPrinter(Printer):
|
||||
|
||||
def __init__(self, changes: Changes) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
changes(Changes): package changes
|
||||
"""
|
||||
|
@ -33,8 +33,6 @@ class ConfigurationPathsPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, root: Path, includes: list[Path]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
root(Path): path to root configuration file
|
||||
includes(list[Path]): list of include files
|
||||
|
@ -42,8 +42,6 @@ class ConfigurationPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, section: str, values: dict[str, str]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
section(str): section name
|
||||
values(dict[str, str]): configuration values dictionary
|
||||
|
@ -34,8 +34,6 @@ class EventStatsPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, event_type: str, events: list[float | int]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
event_type(str): event type used for this statistics
|
||||
events(list[float | int]): event values to build statistics
|
||||
|
@ -34,8 +34,6 @@ class PackagePrinter(StringPrinter):
|
||||
|
||||
def __init__(self, package: Package, status: BuildStatus) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package(Package): package description
|
||||
status(BuildStatus): build status
|
||||
|
@ -33,8 +33,6 @@ class PackageStatsPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, events: dict[str, int]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
events(dict[str, int]): map of package to its event frequency
|
||||
"""
|
||||
|
@ -32,8 +32,6 @@ class PatchPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, package_base: str, patches: list[PkgbuildPatch]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package_base(str): package base
|
||||
patches(list[PkgbuildPatch]): PKGBUILD patch object
|
||||
|
@ -32,8 +32,6 @@ class RepositoryPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
"""
|
||||
|
@ -28,8 +28,6 @@ class StatusPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, status: BuildStatus) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
status(BuildStatus): build status
|
||||
"""
|
||||
|
@ -30,8 +30,6 @@ class StringPrinter(Printer):
|
||||
|
||||
def __init__(self, content: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
content(str): any content string
|
||||
"""
|
||||
|
@ -32,8 +32,6 @@ class TreePrinter(StringPrinter):
|
||||
|
||||
def __init__(self, level: int, packages: list[Package]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
level(int): dependencies tree level
|
||||
packages(list[Package]): packages which belong to this level
|
||||
|
@ -34,8 +34,6 @@ class UpdatePrinter(StringPrinter):
|
||||
|
||||
def __init__(self, remote: Package, local_version: str | None) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
remote(Package): remote (new) package object
|
||||
local_version(str | None): local version of the package if any
|
||||
|
@ -32,8 +32,6 @@ class UserPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, user: User) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
user(User): user to print
|
||||
"""
|
||||
|
@ -35,8 +35,6 @@ class ValidationPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, node: str, errors: list[str | dict[str, Any]]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
node(str): root level name
|
||||
errors(list[str | dict[str, Any]]): validation errors
|
||||
|
@ -31,8 +31,6 @@ class VersionPrinter(StringPrinter):
|
||||
|
||||
def __init__(self, title: str, packages: dict[str, str]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
title(str): title of the message
|
||||
packages(dict[str, str]): map of package name to its version
|
||||
|
@ -45,8 +45,6 @@ class RemotePull(LazyLogging):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -64,8 +64,6 @@ class RemotePullTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -46,8 +46,6 @@ class RemotePush(LazyLogging):
|
||||
|
||||
def __init__(self, reporter: Client, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
reporter(Client): reporter client
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -76,8 +76,6 @@ class RemotePushTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -44,8 +44,6 @@ class SyncHttpClient(LazyLogging):
|
||||
def __init__(self, configuration: Configuration | None = None, section: str | None = None, *,
|
||||
suppress_errors: bool = False) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration | None, optional): configuration instance (Default value = None)
|
||||
section(str | None, optional): settings section name (Default value = None)
|
||||
|
@ -40,8 +40,6 @@ class HttpLogHandler(logging.Handler):
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, *,
|
||||
report: bool, suppress_errors: bool) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -31,8 +31,6 @@ class _JournalHandler(NullHandler):
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
*args(Any): positional arguments
|
||||
**kwargs(Any): keyword arguments
|
||||
|
@ -35,8 +35,6 @@ class Console(Report):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -51,8 +51,6 @@ class Email(Report, JinjaTemplate):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -36,8 +36,6 @@ class HTML(Report, JinjaTemplate):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -73,8 +73,6 @@ class JinjaTemplate:
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -42,8 +42,6 @@ class RemoteCall(Report):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -56,8 +56,6 @@ class Report(LazyLogging):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -384,8 +384,6 @@ class ReportTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -46,8 +46,6 @@ class RSS(Report, JinjaTemplate):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -44,8 +44,6 @@ class Telegram(Report, JinjaTemplate, SyncHttpClient):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -57,8 +57,6 @@ class RepositoryProperties(EventLogger, LazyLogging):
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, database: SQLite, *, report: bool,
|
||||
refresh_pacman_database: PacmanSynchronization) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -38,8 +38,6 @@ class GPG(SyncHttpClient):
|
||||
|
||||
def __init__(self, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
"""
|
||||
|
@ -46,8 +46,6 @@ class Spawn(Thread, LazyLogging):
|
||||
|
||||
def __init__(self, args_parser: argparse.ArgumentParser, command_arguments: list[str]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
args_parser(argparse.ArgumentParser): command line parser for the application
|
||||
command_arguments(list[str]): base command line arguments
|
||||
|
@ -40,8 +40,6 @@ class LocalClient(Client):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, database: SQLite) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
database(SQLite): database instance:
|
||||
|
@ -44,8 +44,6 @@ class Watcher(LazyLogging):
|
||||
|
||||
def __init__(self, client: Client) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
client(Client): reporter instance
|
||||
"""
|
||||
|
@ -45,8 +45,6 @@ class WebClient(Client, SyncAhrimanClient):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -106,8 +106,6 @@ class KeyringTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -93,8 +93,6 @@ class MirrorlistTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -40,8 +40,6 @@ class PackageCreator:
|
||||
|
||||
def __init__(self, configuration: Configuration, generator: PkgbuildGenerator) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration instance
|
||||
generator(PkgbuildGenerator): PKGBUILD generator instance
|
||||
|
@ -47,8 +47,6 @@ class KeyringGenerator(PkgbuildGenerator):
|
||||
def __init__(self, database: SQLite, sign: GPG, repository_id: RepositoryId,
|
||||
configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
database(SQLite): database instance
|
||||
sign(GPG): GPG wrapper instance
|
||||
|
@ -41,8 +41,6 @@ class MirrorlistGenerator(PkgbuildGenerator):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -38,8 +38,6 @@ class Leaf:
|
||||
|
||||
def __init__(self, package: Package) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
package(Package): package properties
|
||||
"""
|
||||
@ -122,8 +120,6 @@ class Tree:
|
||||
|
||||
def __init__(self, leaves: list[Leaf]) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
leaves(list[Leaf]): leaves to build the tree
|
||||
"""
|
||||
|
@ -61,8 +61,6 @@ class Trigger(LazyLogging):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -59,9 +59,7 @@ class TriggerLoader(LazyLogging):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
self._on_stop_requested = False
|
||||
self.triggers: list[Trigger] = []
|
||||
|
||||
|
@ -44,8 +44,6 @@ class GitHub(Upload, HttpUpload):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -42,8 +42,6 @@ class RemoteService(Upload, HttpUpload):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -37,8 +37,6 @@ class Rsync(Upload):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -43,8 +43,6 @@ class S3(Upload):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration, section: str) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -57,8 +57,6 @@ class Upload(LazyLogging):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -163,8 +163,6 @@ class UploadTrigger(Trigger):
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
configuration(Configuration): configuration instance
|
||||
|
@ -55,8 +55,6 @@ class Event:
|
||||
def __init__(self, event: str | EventType, object_id: str, message: str | None = None, created: int | None = None,
|
||||
**kwargs: Any):
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
event(str | EventType): event type
|
||||
object_id(str): object identifier
|
||||
|
@ -44,9 +44,7 @@ class MetricsTimer:
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
default constructor
|
||||
"""
|
||||
""""""
|
||||
self.start_time: float | None = None
|
||||
|
||||
@property
|
||||
|
@ -43,8 +43,6 @@ class Result:
|
||||
def __init__(self, *, added: Iterable[Package] | None = None, updated: Iterable[Package] | None = None,
|
||||
removed: Iterable[Package] | None = None, failed: Iterable[Package] | None = None) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
added(Iterable[Package] | None, optional): initial list of successfully added packages
|
||||
(Default value = None)
|
||||
|
@ -47,8 +47,6 @@ class _AuthorizationPolicy(aiohttp_security.AbstractAuthorizationPolicy):
|
||||
|
||||
def __init__(self, validator: Auth) -> None:
|
||||
"""
|
||||
default constructor
|
||||
|
||||
Args:
|
||||
validator(Auth): authorization module instance
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user