lint: add initial basedpyright config
This commit is contained in:
parent
cabc49be88
commit
e095cab2c5
21 changed files with 11587 additions and 43 deletions
|
|
@ -8,3 +8,9 @@ path = ["requirements/**.txt", "requirements/**.in"]
|
|||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "None"
|
||||
SPDX-License-Identifier = "Unlicense"
|
||||
|
||||
[[annotations]]
|
||||
path = ["typings/libdnf5/*.pyi", "typings/rpm/*.pyi"]
|
||||
precedence = "override"
|
||||
SPDX-FileCopyrightText = "None"
|
||||
SPDX-License-Identifier = "Unlicense"
|
||||
|
|
|
|||
10
custom-basedpyright.toml
Normal file
10
custom-basedpyright.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (C) 2024 Maxwell G <maxwell@gtmx.me>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
[tool.basedpyright]
|
||||
include = [
|
||||
"src/fedrq/backends/libdnf5/backend/__init__.py",
|
||||
"tests/unit/test_dnf.py",
|
||||
]
|
||||
|
||||
typeCheckingMode = "standard"
|
||||
21
noxfile.py
21
noxfile.py
|
|
@ -25,7 +25,7 @@ PINNED = os.environ.get("PINNED", "true").lower() in (
|
|||
|
||||
PROJECT = "fedrq"
|
||||
SPECFILE = "fedrq.spec"
|
||||
LINT_SESSIONS = ("formatters", "codeqa", "typing")
|
||||
LINT_SESSIONS = ("formatters", "codeqa", "typing", "basedpyright")
|
||||
LINT_FILES = (f"src/{PROJECT}", "tests/", "noxfile.py")
|
||||
|
||||
nox.options.sessions = ("lint", "covtest", "mkdocs")
|
||||
|
|
@ -85,7 +85,7 @@ def coverage(session: nox.Session):
|
|||
session.run("coverage", "report", "--fail-under=90")
|
||||
|
||||
|
||||
@nox.session
|
||||
@nox.session(venv_backend=None)
|
||||
def covtest(session: nox.Session):
|
||||
session.run("rm", "-f", *iglob(".nox/*/tmp/.coverage"), external=True)
|
||||
for name in ("dnf_test", "libdnf5_test", "pydanticv1_test", "coverage"):
|
||||
|
|
@ -118,10 +118,25 @@ def formatters(session: nox.Session):
|
|||
session.run("isort", *posargs, *LINT_FILES)
|
||||
|
||||
|
||||
@nox.session
|
||||
def alltyping(session: nox.Session):
|
||||
session.notify("typing")
|
||||
session.notify("basedpyright")
|
||||
|
||||
|
||||
@nox.session
|
||||
def typing(session: nox.Session):
|
||||
install(session, ".[typing]", editable=True, constraint="typing")
|
||||
session.run("mypy", "src/fedrq/")
|
||||
session.run("mypy", "src/fedrq/", "tests/unit", "tests/integration")
|
||||
|
||||
|
||||
@nox.session(venv_params=["--system-site-packages"])
|
||||
def basedpyright(session: nox.Session):
|
||||
"""
|
||||
Run basedpyright with system dependencies enabled
|
||||
"""
|
||||
install(session, ".[typing]", editable=True, constraint="typing")
|
||||
session.run("basedpyright", "--project", "custom-basedpyright.toml")
|
||||
|
||||
|
||||
@nox.session(reuse_venv=False)
|
||||
|
|
|
|||
|
|
@ -64,12 +64,13 @@ formatters = [
|
|||
"isort !=5.13.0",
|
||||
]
|
||||
typing = [
|
||||
"mypy",
|
||||
"types-requests",
|
||||
# Optional fedrq runtime dependency
|
||||
"argcomplete",
|
||||
"typing_extensions",
|
||||
"basedpyright",
|
||||
"fedrq[test]",
|
||||
"mypy",
|
||||
"tomli-w",
|
||||
"types-requests",
|
||||
"typing_extensions",
|
||||
]
|
||||
test = [
|
||||
"pytest",
|
||||
|
|
@ -115,19 +116,23 @@ module = ["argcomplete.*", "dnf.*", "hawkey.*", "libdnf5.*", "rpm.*"]
|
|||
ignore_missing_imports = true
|
||||
|
||||
|
||||
[tool.basedpyright]
|
||||
typeCheckingMode = "standard"
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
markers = ["no_rpm_mock: Tests that cannot be run in a mock chroot w/o networking"]
|
||||
addopts = [
|
||||
"--import-mode=importlib",
|
||||
]
|
||||
pythonpath = ["."]
|
||||
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
add_imports = [
|
||||
'from __future__ import annotations',
|
||||
]
|
||||
# add_imports = [
|
||||
# 'from __future__ import annotations',
|
||||
# ]
|
||||
|
||||
|
||||
[tool.coverage.run]
|
||||
|
|
@ -158,6 +163,7 @@ exclude_lines = [
|
|||
'@overload',
|
||||
'except ImportError',
|
||||
'raise AssertionError\("unreachable"\)',
|
||||
'\.\.\.',
|
||||
]
|
||||
omit = [
|
||||
"src/fedrq/_compat.py",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ attrs==24.2.0
|
|||
# via reuse
|
||||
babel==2.16.0
|
||||
# via mkdocs-material
|
||||
basedpyright==1.17.0
|
||||
# via fedrq (pyproject.toml)
|
||||
binaryornot==0.4.4
|
||||
# via reuse
|
||||
black==24.8.0
|
||||
|
|
@ -139,6 +141,8 @@ mypy-extensions==1.0.0
|
|||
# via
|
||||
# black
|
||||
# mypy
|
||||
nodejs-wheel-binaries==20.17.0
|
||||
# via basedpyright
|
||||
packaging==24.1
|
||||
# via
|
||||
# black
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ annotated-types==0.7.0
|
|||
# via pydantic
|
||||
argcomplete==3.5.0
|
||||
# via fedrq (pyproject.toml)
|
||||
basedpyright==1.17.5
|
||||
# via fedrq (pyproject.toml)
|
||||
certifi==2024.8.30
|
||||
# via requests
|
||||
charset-normalizer==3.3.2
|
||||
|
|
@ -14,6 +16,8 @@ mypy==1.11.2
|
|||
# via fedrq (pyproject.toml)
|
||||
mypy-extensions==1.0.0
|
||||
# via mypy
|
||||
nodejs-wheel-binaries==20.17.0
|
||||
# via basedpyright
|
||||
pydantic==2.9.2
|
||||
# via fedrq (pyproject.toml)
|
||||
pydantic-core==2.23.4
|
||||
|
|
|
|||
|
|
@ -30,7 +30,17 @@ from fedrq.backends.dnf import BACKEND
|
|||
|
||||
try:
|
||||
import dnf
|
||||
import dnf.conf
|
||||
import dnf.conf.read
|
||||
import dnf.exceptions
|
||||
import dnf.package
|
||||
import dnf.query
|
||||
import dnf.repodict
|
||||
import dnf.rpm
|
||||
import dnf.sack
|
||||
import dnf.subject
|
||||
import hawkey
|
||||
import hawkey._hawkey
|
||||
except ImportError:
|
||||
raise MissingBackendError from None
|
||||
|
||||
|
|
@ -57,12 +67,16 @@ class BaseMaker(BaseMakerBase):
|
|||
"""
|
||||
Initialize and configure the base object.
|
||||
"""
|
||||
self.base: dnf.Base = base or dnf.Base()
|
||||
self.base = base or dnf.Base()
|
||||
|
||||
@property
|
||||
def conf(self) -> dnf.conf.MainConf:
|
||||
return self.base.conf
|
||||
|
||||
@property
|
||||
def _repos(self) -> dnf.repodict.RepoDict:
|
||||
return t.cast("dnf.repodict.RepoDict", self.base.repos)
|
||||
|
||||
def set(self, key: str, value: t.Any) -> None:
|
||||
setattr(self.conf, key, value)
|
||||
|
||||
|
|
@ -74,7 +88,9 @@ class BaseMaker(BaseMakerBase):
|
|||
def load_filelists(self, enable: bool = True) -> None:
|
||||
# Old versions of dnf always load filelists
|
||||
try:
|
||||
types: list[str] = self.conf.optional_metadata_types
|
||||
types: list[str] = (
|
||||
self.conf.optional_metadata_types
|
||||
) # pyright: ignore[reportAssignmentType]
|
||||
except AttributeError:
|
||||
return
|
||||
if enable:
|
||||
|
|
@ -84,7 +100,7 @@ class BaseMaker(BaseMakerBase):
|
|||
types.remove("filelists")
|
||||
|
||||
def load_changelogs(self, enable: bool = True) -> None:
|
||||
for repo in self.base.repos.iter_enabled():
|
||||
for repo in self._repos.iter_enabled():
|
||||
repo.load_metadata_other = enable
|
||||
|
||||
def fill_sack(
|
||||
|
|
@ -114,7 +130,7 @@ class BaseMaker(BaseMakerBase):
|
|||
self.base.read_all_repos()
|
||||
if not disable:
|
||||
return None
|
||||
for repo in self.base.repos.iter_enabled():
|
||||
for repo in self._repos.iter_enabled():
|
||||
repo.disable()
|
||||
|
||||
def enable_repos(self, repos: Collection[str]) -> None:
|
||||
|
|
@ -130,7 +146,7 @@ class BaseMaker(BaseMakerBase):
|
|||
Enable a repo by its id.
|
||||
Raise a ValueError if the repoid is not in `self.base`'s configuration.
|
||||
"""
|
||||
if repo_obj := self.base.repos.get_matching(repo):
|
||||
if repo_obj := self._repos.get_matching(repo):
|
||||
repo_obj.enable()
|
||||
else:
|
||||
raise ValueError(f"{repo} repo definition was not found.")
|
||||
|
|
@ -141,7 +157,7 @@ class BaseMaker(BaseMakerBase):
|
|||
Raise a ValueError if the repoid is not in `self.base`'s configuration
|
||||
when ignore_missing is False.
|
||||
"""
|
||||
if repo_obj := self.base.repos.get_matching(repo):
|
||||
if repo_obj := self._repos.get_matching(repo):
|
||||
repo_obj.disable()
|
||||
elif not ignore_missing:
|
||||
raise ValueError(f"{repo} repo definition was not found.")
|
||||
|
|
@ -150,7 +166,7 @@ class BaseMaker(BaseMakerBase):
|
|||
rr = dnf.conf.read.RepoReader(self.base.conf, None)
|
||||
for repo in rr._get_repos(str(file)):
|
||||
LOG.debug("Adding %s from %s", repo.id, file)
|
||||
self.base.repos.add(repo)
|
||||
self._repos.add(repo)
|
||||
|
||||
# This is private for now
|
||||
def _read_repofile_new(self, file: StrPath, ensure_enabled: bool = False) -> None:
|
||||
|
|
@ -164,10 +180,10 @@ class BaseMaker(BaseMakerBase):
|
|||
LOG.debug("Not adding %s. It's already in the config.", repo.id)
|
||||
else:
|
||||
LOG.debug("Adding %s from %s", repo.id, file)
|
||||
self.base.repos.add(repo)
|
||||
self._repos.add(repo)
|
||||
if ensure_enabled:
|
||||
LOG.debug("Ensuring that %s is enabled.", repo.id)
|
||||
self.base.repos[repo.id].enable()
|
||||
self._repos[repo.id].enable()
|
||||
|
||||
def create_repo(self, repoid: str, **kwargs: t.Any) -> None:
|
||||
"""
|
||||
|
|
@ -178,19 +194,19 @@ class BaseMaker(BaseMakerBase):
|
|||
key-values options that should be set on the Repo object values
|
||||
(like `$basearch`) will be substituted automatically.
|
||||
"""
|
||||
self.base.repos.add_new_repo(repoid, self.conf, **kwargs)
|
||||
self._repos.add_new_repo(repoid, self.conf, **kwargs)
|
||||
|
||||
@property
|
||||
def backend(self) -> BackendMod:
|
||||
return sys.modules[__name__]
|
||||
return t.cast("BackendMod", sys.modules[__name__])
|
||||
|
||||
def repolist(self, enabled: bool | None = None) -> list[str]:
|
||||
if enabled is None:
|
||||
return list(self.base.repos)
|
||||
return [r.id for r in self.base.repos.values() if r.enabled is bool(enabled)]
|
||||
return list(self._repos)
|
||||
return [r.id for r in self._repos.values() if r.enabled is bool(enabled)]
|
||||
|
||||
def enable_source_repos(self) -> None:
|
||||
self.base.repos.enable_source_repos()
|
||||
self._repos.enable_source_repos()
|
||||
|
||||
|
||||
class NEVRAForms(int, Enum):
|
||||
|
|
@ -211,8 +227,8 @@ class Repoquery(RepoqueryBase[PackageCompat]):
|
|||
def base_arches(self) -> set[str]:
|
||||
return {self.base.conf.arch, self.base.conf.basearch}
|
||||
|
||||
def _query(self) -> dnf.query.Query:
|
||||
return self.base.sack.query()
|
||||
def _query(self) -> hawkey._hawkey.Query:
|
||||
return t.cast("dnf.sack.Sack", self.base.sack).query()
|
||||
|
||||
def resolve_pkg_specs(
|
||||
self,
|
||||
|
|
@ -247,7 +263,7 @@ class Repoquery(RepoqueryBase[PackageCompat]):
|
|||
|
||||
@property
|
||||
def backend(self) -> BackendMod:
|
||||
return sys.modules[__name__]
|
||||
return t.cast("BackendMod", sys.modules[__name__])
|
||||
|
||||
|
||||
@cache
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ if t.TYPE_CHECKING:
|
|||
|
||||
try:
|
||||
import libdnf5 # type: ignore[import]
|
||||
import libdnf5._rpm
|
||||
import libdnf5.common
|
||||
import libdnf5.conf
|
||||
import libdnf5.rpm
|
||||
except ImportError as exc:
|
||||
raise MissingBackendError(str(exc)) from None
|
||||
|
||||
|
|
@ -226,12 +230,12 @@ class BaseMaker(BaseMakerBase):
|
|||
self.initialized = True
|
||||
|
||||
@property
|
||||
def conf(self) -> libdnf5.config.ConfigMain:
|
||||
def conf(self) -> libdnf5.conf.ConfigMain:
|
||||
return self.base.get_config()
|
||||
|
||||
# Not part of the BaseMakerBase interface
|
||||
@property
|
||||
def config(self) -> libdnf5.config.ConfigMain:
|
||||
def config(self) -> libdnf5.conf.ConfigMain:
|
||||
"""
|
||||
**DEPRECATED: use `conf` property instead**
|
||||
"""
|
||||
|
|
@ -280,13 +284,15 @@ class BaseMaker(BaseMakerBase):
|
|||
if from_cache:
|
||||
raise NotImplementedError
|
||||
try:
|
||||
self.rs.load_repos(
|
||||
self.rs.load_repos( # pyright: ignore[reportAttributeAccessIssue]
|
||||
libdnf5.repo.Repo.Type_SYSTEM
|
||||
if load_system_repo
|
||||
else libdnf5.repo.Repo.Type_AVAILABLE
|
||||
)
|
||||
except AttributeError:
|
||||
self.rs.update_and_load_enabled_repos(load_system_repo)
|
||||
self.rs.update_and_load_enabled_repos(
|
||||
load_system_repo
|
||||
) # pyright: ignore[reportAttributeAccessIssue]
|
||||
return self.base
|
||||
|
||||
def read_system_repos(self, disable: bool = True) -> None:
|
||||
|
|
@ -443,7 +449,7 @@ class BaseMaker(BaseMakerBase):
|
|||
|
||||
@property
|
||||
def backend(self) -> BackendMod:
|
||||
return sys.modules[__name__]
|
||||
return t.cast(BackendMod, sys.modules[__name__])
|
||||
|
||||
def repolist(self, enabled: bool | None = None) -> list[str]:
|
||||
repoq = libdnf5.repo.RepoQuery(self.base)
|
||||
|
|
@ -468,8 +474,8 @@ class Package(libdnf5.rpm.Package, PackageCompat):
|
|||
def __gt__(self, other) -> bool:
|
||||
if not isinstance(other, libdnf5.rpm.Package):
|
||||
raise TypeError
|
||||
if self.name != other.name:
|
||||
return self.name > other.name
|
||||
if self.get_name() != other.get_name():
|
||||
return self.get_name() > other.get_name()
|
||||
evrcmp = libdnf5.rpm.rpmvercmp(self.get_evr(), other.get_evr())
|
||||
if evrcmp != 0:
|
||||
return evrcmp > 0
|
||||
|
|
@ -783,26 +789,32 @@ class PackageQuery(libdnf5.rpm.PackageQuery, PackageQueryCompat[Package]):
|
|||
self._filter(**kwargs)
|
||||
return self
|
||||
|
||||
def __len__(self) -> int:
|
||||
return self.size()
|
||||
if not hasattr(libdnf5.rpm.PackageSet, "__len__"):
|
||||
|
||||
def __len__(self) -> int:
|
||||
return self.size()
|
||||
|
||||
def union(self, other) -> PackageQuery:
|
||||
self.update(other)
|
||||
return self
|
||||
|
||||
__ior__ = union
|
||||
|
||||
def intersection(self, other) -> PackageQuery:
|
||||
libdnf5.rpm.PackageQuery.intersection(self, other)
|
||||
return self
|
||||
|
||||
__iand__ = intersection
|
||||
|
||||
def difference(self, other) -> PackageQuery:
|
||||
libdnf5.rpm.PackageQuery.difference(self, other)
|
||||
return self
|
||||
|
||||
def __ior__(self, other: PackageQuery) -> PackageQuery:
|
||||
return self.union(other)
|
||||
__isub__ = difference
|
||||
|
||||
_pkg_comps: TypeAlias = (
|
||||
"t.Union[libdnf5.common.QueryCmp_EQ, libdnf5.common.QueryCmp_NEQ]"
|
||||
# "t.Union[libdnf5.common.QueryCmp_EQ, libdnf5.common.QueryCmp_NEQ]"
|
||||
"int"
|
||||
)
|
||||
|
||||
def filter_pkg(
|
||||
|
|
@ -929,7 +941,7 @@ class Repoquery(RepoqueryBase[Package]):
|
|||
|
||||
@property
|
||||
def backend(self) -> BackendMod:
|
||||
return sys.modules[__name__]
|
||||
return t.cast(BackendMod, sys.modules[__name__])
|
||||
|
||||
|
||||
@functools.cache
|
||||
|
|
|
|||
|
|
@ -280,12 +280,12 @@ class Command(metaclass=abc.ABCMeta):
|
|||
add_help=False, parents=[cls.branch_repo_parser()]
|
||||
)
|
||||
if name:
|
||||
parser.add_argument( # type: ignore[attr-defined]
|
||||
parser.add_argument(
|
||||
"names",
|
||||
metavar="NAME",
|
||||
nargs="*",
|
||||
help="Mutually exclusive with --stdin",
|
||||
).completer = lambda **_: ()
|
||||
).completer = lambda **_: () # type: ignore[attr-defined]
|
||||
parser.add_argument(
|
||||
"-i",
|
||||
"--stdin",
|
||||
|
|
@ -295,11 +295,11 @@ class Command(metaclass=abc.ABCMeta):
|
|||
if latest:
|
||||
parser.add_argument("-l", "--latest", default=1, help="'all' or an integer")
|
||||
if formatter:
|
||||
parser.add_argument( # type: ignore[attr-defined]
|
||||
parser.add_argument(
|
||||
"-F",
|
||||
"--formatter",
|
||||
default="plain",
|
||||
).completer = cls.formatters._argcompleter
|
||||
).completer = cls.formatters._argcompleter # type: ignore[attr-defined]
|
||||
cachedir_group = parser.add_mutually_exclusive_group()
|
||||
cachedir_group.add_argument(
|
||||
"--system-cache",
|
||||
|
|
|
|||
16
typings/libdnf5/__init__.pyi
Normal file
16
typings/libdnf5/__init__.pyi
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from . import (
|
||||
advisory,
|
||||
base,
|
||||
common,
|
||||
comps,
|
||||
conf,
|
||||
logger,
|
||||
plugin,
|
||||
repo,
|
||||
rpm,
|
||||
transaction,
|
||||
)
|
||||
824
typings/libdnf5/advisory.pyi
Normal file
824
typings/libdnf5/advisory.pyi
Normal file
|
|
@ -0,0 +1,824 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class SwigPyIterator:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def value(self): ...
|
||||
def incr(self, n=...): ...
|
||||
def decr(self, n=...): ...
|
||||
def distance(self, x): ...
|
||||
def equal(self, x): ...
|
||||
def copy(self): ...
|
||||
def next(self): ...
|
||||
def __next__(self): ...
|
||||
def previous(self): ...
|
||||
def advance(self, n): ...
|
||||
def __eq__(self, x) -> bool: ...
|
||||
def __ne__(self, x) -> bool: ...
|
||||
def __iadd__(self, n): ...
|
||||
def __isub__(self, n): ...
|
||||
def __add__(self, n): ...
|
||||
def __sub__(self, *args): ...
|
||||
def __iter__(self): # -> Self:
|
||||
...
|
||||
|
||||
class AdvisoryId:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
id = ...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Advisory:
|
||||
r"""An advisory, represents advisory used to track security updates"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def get_name(self):
|
||||
r"""
|
||||
Get name of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Name of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_severity(self):
|
||||
r"""
|
||||
Get severity of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Severity of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_type(self):
|
||||
r"""
|
||||
Get type of this advisory.
|
||||
Possible types are: "security", "bugfix", "enhancement", "newpackage".
|
||||
|
||||
:rtype: string
|
||||
:return: type of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_buildtime(self):
|
||||
r"""
|
||||
Get buildtime of this advisory. Libsolv combines issued and updated dates
|
||||
into buildtime by always using the newer one.
|
||||
|
||||
:rtype: int
|
||||
:return: buildtime of this advisory.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_vendor(self):
|
||||
r"""
|
||||
Get vendor of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Vendor of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_description(self):
|
||||
r"""
|
||||
Get description of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Description of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_title(self):
|
||||
r"""
|
||||
Get title of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Title of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_status(self):
|
||||
r"""
|
||||
Get status of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Status of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_rights(self):
|
||||
r"""
|
||||
Get rights of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Rights of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_message(self):
|
||||
r"""
|
||||
Get message of this advisory.
|
||||
|
||||
:rtype: string
|
||||
:return: Message of this advisory as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_id(self):
|
||||
r"""
|
||||
Get AdvisoryId.
|
||||
|
||||
:rtype: :py:class:`AdvisoryId`
|
||||
:return: AdvisoryId of this advisory.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_references(self, *args):
|
||||
r"""
|
||||
Get all references of specified type from this advisory.
|
||||
Possible refenrece types are: "bugzilla", "cve", "vendor".
|
||||
|
||||
:type types: std::vector< std::string,std::allocator< std::string > >, optional
|
||||
:param types: What types of references to get. If not specified gets all types.
|
||||
:rtype: std::vector< libdnf5::advisory::AdvisoryReference,std::allocator< libdnf5::advisory::AdvisoryReference > >
|
||||
:return: Vector of AdvisoryReference objects.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_collections(self):
|
||||
r"""
|
||||
Get all collections from this advisory.
|
||||
|
||||
:rtype: std::vector< libdnf5::advisory::AdvisoryCollection,std::allocator< libdnf5::advisory::AdvisoryCollection > >
|
||||
:return: Vector of AdvisoryCollection objects.
|
||||
"""
|
||||
...
|
||||
|
||||
def is_applicable(self):
|
||||
r"""
|
||||
Check whether at least one collection from this advisory is applicable.
|
||||
|
||||
:rtype: boolean
|
||||
:return: True if applicable, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
class AdvisoryPackage:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def get_name(self):
|
||||
r"""
|
||||
Get name of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Name of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_epoch(self):
|
||||
r"""
|
||||
Get epoch of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Epoch of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_version(self):
|
||||
r"""
|
||||
Get version of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Version of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_release(self):
|
||||
r"""
|
||||
Get release version of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Release of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_evr(self):
|
||||
r"""
|
||||
Get evr of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Evr of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_arch(self):
|
||||
r"""
|
||||
Get arch of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: Arch of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_nevra(self):
|
||||
r"""
|
||||
Get NEVRA of this AdvisoryPackage.
|
||||
|
||||
:rtype: string
|
||||
:return: NEVRA of this AdvisoryPackage as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_id(self):
|
||||
r"""
|
||||
Get AdvisoryId of Advisory this AdvisoryPackage belongs to.
|
||||
|
||||
:rtype: :py:class:`AdvisoryId`
|
||||
:return: AdvisoryId of this AdvisoryPackage.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_reboot_suggested(self):
|
||||
r"""
|
||||
Get bool value whether reboot is suggested
|
||||
|
||||
:rtype: boolean
|
||||
:return: Reboot suggestion of this advisory package as bool
|
||||
"""
|
||||
...
|
||||
|
||||
def get_restart_suggested(self):
|
||||
r"""
|
||||
Get bool value whether restart is suggested
|
||||
|
||||
:rtype: boolean
|
||||
:return: Restart suggestion of this advisory package as bool
|
||||
"""
|
||||
...
|
||||
|
||||
def get_relogin_suggested(self):
|
||||
r"""
|
||||
Get bool value whether relogin is suggested
|
||||
|
||||
:rtype: boolean
|
||||
:return: Relogin suggestion of this advisory package as bool
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory(self):
|
||||
r"""
|
||||
Get Advisory this AdvisoryPackage belongs to.
|
||||
|
||||
:rtype: :py:class:`Advisory`
|
||||
:return: newly construted Advisory object of this AdvisoryPackage.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_collection(self):
|
||||
r"""
|
||||
Get AdvisoryCollection this AdvisoryPackage belongs to.
|
||||
|
||||
:rtype: :py:class:`AdvisoryCollection`
|
||||
:return: newly construted AdvisoryCollection object of this AdvisoryPackage.
|
||||
"""
|
||||
...
|
||||
|
||||
class AdvisorySet:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def __ior__(self, other): ...
|
||||
def __isub__(self, other): ...
|
||||
def __iand__(self, other): ...
|
||||
def update(self, other):
|
||||
r"""
|
||||
Set union: elements that are in the current set or in the `other` set.
|
||||
|
||||
:type other: :py:class:`AdvisorySet`
|
||||
:param other: The set to unify with.
|
||||
:raises: UsedDifferentSack When the sets entering the operation do not share the same AdvisorySack.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def intersection(self, other):
|
||||
r"""
|
||||
Set intersection: elements in the current set that are also in the `other` set.
|
||||
|
||||
:type other: :py:class:`AdvisorySet`
|
||||
:param other: The set to intersect with.
|
||||
:raises: UsedDifferentSack When the sets entering the operation do not share the same AdvisorySack.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def difference(self, other):
|
||||
r"""
|
||||
Set difference: elements in the current set that are not in the `other` set.
|
||||
|
||||
:type other: :py:class:`AdvisorySet`
|
||||
:param other: The set to check for differences in.
|
||||
:raises: UsedDifferentSack When the sets entering the operation do not share the same AdvisorySack.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def clear(self):
|
||||
r"""
|
||||
Remove all advisories from the set.
|
||||
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def empty(self):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if the set is empty, `false` otherwise.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def add(self, adv):
|
||||
r"""
|
||||
Add `adv` to the set.
|
||||
|
||||
:type adv: :py:class:`Advisory`
|
||||
:param adv: Advisory to be added to the set.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def contains(self, adv):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if an advisory is in the set, `false` otherwise.
|
||||
:type adv: :py:class:`Advisory`
|
||||
:param adv: Advisory that is tested for presence.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def remove(self, adv):
|
||||
r"""
|
||||
Remove `adv` from the set.
|
||||
|
||||
:type adv: :py:class:`Advisory`
|
||||
:param adv: Advisory to be removed from the set.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_base(self): ...
|
||||
def size(self):
|
||||
r"""
|
||||
:rtype: int
|
||||
:return: Number of elements in the set.
|
||||
"""
|
||||
...
|
||||
|
||||
def swap(self, other): ...
|
||||
def get_advisory_packages_sorted_by_name_arch_evr(self, only_applicable=...):
|
||||
r"""
|
||||
Gather AdvisoryPackages for each Advisory in the set.
|
||||
The AdvisoryPackages are sorted by libsolv `id`s of name, arch and evr.
|
||||
This is a different sorting than sorting by the strings of AdvisoryPackages names, architectures and evrs.
|
||||
|
||||
:type only_applicable: boolean, optional
|
||||
:param only_applicable: Whether to return only AdvisoryPackages from applicable AdvisoryCollections.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
class AdvisorySetIterator:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, other) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def value(self): ...
|
||||
def next(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def begin(self, *args): ...
|
||||
def end(self, *args): ...
|
||||
|
||||
class AdvisoryModule:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def get_name(self):
|
||||
r"""
|
||||
Get name of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: Name of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_stream(self):
|
||||
r"""
|
||||
Get stream of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: Stream of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_version(self):
|
||||
r"""
|
||||
Get version of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: Version of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_context(self):
|
||||
r"""
|
||||
Get context of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: Context of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_arch(self):
|
||||
r"""
|
||||
Get arch of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: Arch of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_nsvca(self):
|
||||
r"""
|
||||
Get NSVCA of this AdvisoryModule.
|
||||
|
||||
:rtype: string
|
||||
:return: NSVCA of this AdvisoryModule as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_id(self):
|
||||
r"""
|
||||
Get AdvisoryId of Advisory this AdvisoryModule belongs to.
|
||||
|
||||
:rtype: :py:class:`AdvisoryId`
|
||||
:return: AdvisoryId of this AdvisoryModule.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory(self):
|
||||
r"""
|
||||
Get Advisory this AdvisoryModule belongs to.
|
||||
|
||||
:rtype: :py:class:`Advisory`
|
||||
:return: newly construted Advisory object of this AdvisoryModule.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_collection(self):
|
||||
r"""
|
||||
Get AdvisoryCollection this AdvisoryModule belongs to.
|
||||
|
||||
:rtype: :py:class:`AdvisoryCollection`
|
||||
:return: newly construted AdvisoryCollection object of this AdvisoryModule.
|
||||
"""
|
||||
...
|
||||
|
||||
class AdvisoryCollection:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def is_applicable(self):
|
||||
r"""
|
||||
Whether this AdvisoryCollection is applicable. True when at least one AdvisoryModule in this
|
||||
AdvisoryCollection is active on the system, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_id(self):
|
||||
r"""
|
||||
Get AdvisoryId of Advisory this AdvisoryCollection belongs to.
|
||||
|
||||
:rtype: :py:class:`AdvisoryId`
|
||||
:return: AdvisoryId of this AdvisoryCollection.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_packages(self):
|
||||
r"""
|
||||
Get all AdvisoryPackages stored in this AdvisoryCollection
|
||||
|
||||
:rtype: std::vector< libdnf5::advisory::AdvisoryPackage,std::allocator< libdnf5::advisory::AdvisoryPackage > >
|
||||
:return: std::vector of AdvisorPackages used as output.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_modules(self):
|
||||
r"""
|
||||
Get all AdvisoryModules stored in this AdvisoryCollection
|
||||
|
||||
:rtype: std::vector< libdnf5::advisory::AdvisoryModule,std::allocator< libdnf5::advisory::AdvisoryModule > >
|
||||
:return: std::vector of AdvisorModules.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory(self):
|
||||
r"""
|
||||
Get Advisory this AdvisoryCollection belongs to.
|
||||
|
||||
:rtype: :py:class:`Advisory`
|
||||
:return: newly construted Advisory object of this AdvisoryCollection.
|
||||
"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class AdvisoryQuery(AdvisorySet):
|
||||
r"""
|
||||
AdvisoryQuery is the only way how to access advisories.
|
||||
It is constructed using Base and filled with advisories from enabled repositories in its RepoSack.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def filter_name(self, *args): ...
|
||||
def filter_type(self, *args): ...
|
||||
def filter_reference(self, *args): ...
|
||||
def filter_severity(self, *args): ...
|
||||
def filter_packages(self, *args):
|
||||
r"""
|
||||
Filter out advisories that don't contain at least one AdvisoryPackage that has a counterpart Package in package_set
|
||||
such that they have matching name and architecture and also their epoch-version-release complies to cmp_type.
|
||||
|
||||
:type package_set: libdnf5::rpm::PackageSet
|
||||
:param package_set: libdnf5::rpm::PackageSet used when filtering.
|
||||
:type cmp_type: int, optional
|
||||
:param cmp_type: Condition to fulfill when comparing epoch-version-release of packages.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_advisory_packages_sorted(self, *args):
|
||||
r"""
|
||||
Get std::vector of AdvisoryPackages present in advisories from query.
|
||||
Each AdvisoryPackage is returned only if it has a counterpart Package in package_set such that they have matching
|
||||
name and architecture and also their epoch-version-release complies to cmp_type.
|
||||
AdvisoryPackages are sorted in the std::vector by Name, Arch and EVR.
|
||||
|
||||
:type package_set: libdnf5::rpm::PackageSet
|
||||
:param package_set: libdnf5::rpm::PackageSet used when filtering.
|
||||
:type cmp_type: int, optional
|
||||
:param cmp_type: Condition to fulfill when comparing epoch-version-release of packages.
|
||||
:rtype: std::vector< libdnf5::advisory::AdvisoryPackage,std::allocator< libdnf5::advisory::AdvisoryPackage > >
|
||||
:return: std::vector of AdvisoryPackages
|
||||
"""
|
||||
...
|
||||
|
||||
class AdvisoryReference:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def get_id(self):
|
||||
r"""
|
||||
Get id of this advisory reference, this id is like a name of this reference
|
||||
(it is not libsolv id).
|
||||
|
||||
:rtype: string
|
||||
:return: id of this reference as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_type(self):
|
||||
r"""
|
||||
Get type of this reference.
|
||||
Possible reference types are: "bugzilla", "cve", "vendor".
|
||||
|
||||
:rtype: string
|
||||
:return: type of this reference as std::string.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_type_cstring(self):
|
||||
r"""
|
||||
Get type of this reference.
|
||||
|
||||
:rtype: string
|
||||
:return: Type of this reference as const char* !! (temporal value)
|
||||
"""
|
||||
...
|
||||
|
||||
def get_title(self):
|
||||
r"""
|
||||
Get title of this reference.
|
||||
|
||||
:rtype: string
|
||||
:return: Title of this reference.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_url(self):
|
||||
r"""
|
||||
Get url of this reference.
|
||||
|
||||
:rtype: string
|
||||
:return: Url of this reference.
|
||||
"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorAdvisoryModule:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorAdvisoryCollection:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorAdvisoryPackage:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorAdvisoryReference:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def AdvisorySet__iter__(self): # -> Iterator:
|
||||
...
|
||||
1496
typings/libdnf5/base.pyi
Normal file
1496
typings/libdnf5/base.pyi
Normal file
File diff suppressed because it is too large
Load diff
413
typings/libdnf5/common.pyi
Normal file
413
typings/libdnf5/common.pyi
Normal file
|
|
@ -0,0 +1,413 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class SwigPyIterator:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def value(self): ...
|
||||
def incr(self, n=...): ...
|
||||
def decr(self, n=...): ...
|
||||
def distance(self, x): ...
|
||||
def equal(self, x): ...
|
||||
def copy(self): ...
|
||||
def next(self): ...
|
||||
def __next__(self): ...
|
||||
def previous(self): ...
|
||||
def advance(self, n): ...
|
||||
def __eq__(self, x) -> bool: ...
|
||||
def __ne__(self, x) -> bool: ...
|
||||
def __iadd__(self, n): ...
|
||||
def __isub__(self, n): ...
|
||||
def __add__(self, n): ...
|
||||
def __sub__(self, *args): ...
|
||||
def __iter__(self): # -> Self:
|
||||
...
|
||||
|
||||
class VectorString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SetString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def append(self, x): ...
|
||||
def __contains__(self, x): ...
|
||||
def __getitem__(self, i): ...
|
||||
def add(self, x): ...
|
||||
def discard(self, x): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def clear(self): ...
|
||||
def swap(self, v): ...
|
||||
def count(self, x): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def erase(self, *args): ...
|
||||
def find(self, x): ...
|
||||
def lower_bound(self, x): ...
|
||||
def upper_bound(self, x): ...
|
||||
def equal_range(self, x): ...
|
||||
def insert(self, __x): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class PairStringString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
first = ...
|
||||
second = ...
|
||||
def __len__(self): # -> Literal[2]:
|
||||
...
|
||||
|
||||
def __repr__(self): # -> str:
|
||||
...
|
||||
|
||||
def __getitem__(self, index): # -> Any:
|
||||
...
|
||||
|
||||
def __setitem__(self, index, val): # -> None:
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorPairStringString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class MapStringString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def iteritems(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __delitem__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self): ...
|
||||
def __contains__(self, key): ...
|
||||
def key_iterator(self): ...
|
||||
def value_iterator(self): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def asdict(self): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def count(self, x): ...
|
||||
def erase(self, *args): ...
|
||||
def find(self, x): ...
|
||||
def lower_bound(self, x): ...
|
||||
def upper_bound(self, x): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class MapStringMapStringString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def iteritems(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __delitem__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self): ...
|
||||
def __contains__(self, key): ...
|
||||
def key_iterator(self): ...
|
||||
def value_iterator(self): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def asdict(self): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def count(self, x): ...
|
||||
def erase(self, *args): ...
|
||||
def find(self, x): ...
|
||||
def lower_bound(self, x): ...
|
||||
def upper_bound(self, x): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class MapStringPairStringString:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def iteritems(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __delitem__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self): ...
|
||||
def __contains__(self, key): ...
|
||||
def key_iterator(self): ...
|
||||
def value_iterator(self): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def asdict(self): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def count(self, x): ...
|
||||
def erase(self, *args): ...
|
||||
def find(self, x): ...
|
||||
def lower_bound(self, x): ...
|
||||
def upper_bound(self, x): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Iterator:
|
||||
def __init__(self, container, begin, end) -> None: ...
|
||||
def __iter__(self): # -> Self:
|
||||
...
|
||||
|
||||
def __next__(self): ...
|
||||
|
||||
QueryCmp_NOT: int = ...
|
||||
QueryCmp_ICASE: int = ...
|
||||
QueryCmp_ISNULL: int = ...
|
||||
QueryCmp_EQ: int = ...
|
||||
QueryCmp_NEQ: int = ...
|
||||
QueryCmp_GT: int = ...
|
||||
QueryCmp_GTE: int = ...
|
||||
QueryCmp_LT: int = ...
|
||||
QueryCmp_LTE: int = ...
|
||||
QueryCmp_EXACT: int = ...
|
||||
QueryCmp_NOT_EXACT: int = ...
|
||||
QueryCmp_IEXACT: int = ...
|
||||
QueryCmp_NOT_IEXACT: int = ...
|
||||
QueryCmp_CONTAINS: int = ...
|
||||
QueryCmp_NOT_CONTAINS: int = ...
|
||||
QueryCmp_ICONTAINS: int = ...
|
||||
QueryCmp_NOT_ICONTAINS: int = ...
|
||||
QueryCmp_STARTSWITH: int = ...
|
||||
QueryCmp_ISTARTSWITH: int = ...
|
||||
QueryCmp_ENDSWITH: int = ...
|
||||
QueryCmp_IENDSWITH: int = ...
|
||||
QueryCmp_REGEX: int = ...
|
||||
QueryCmp_IREGEX: int = ...
|
||||
QueryCmp_GLOB: int = ...
|
||||
QueryCmp_NOT_GLOB: int = ...
|
||||
QueryCmp_IGLOB: int = ...
|
||||
QueryCmp_NOT_IGLOB: int = ...
|
||||
|
||||
def __sub__(lhs, rhs):
|
||||
r"""
|
||||
Returns the value of the left operand with the bits zeroed that are set in the right operand.
|
||||
Can be used eg for removing `NOT` or `ICASE` flags.
|
||||
"""
|
||||
...
|
||||
|
||||
def match_int64(*args): ...
|
||||
def match_string(*args): ...
|
||||
|
||||
class PreserveOrderMapStringString:
|
||||
r"""
|
||||
PreserveOrderMap is an associative container that contains key-value pairs with unique unique keys.
|
||||
It is similar to standard std::map. But it preserves the order of items and the complexity is linear.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def max_size(self): ...
|
||||
def reserve(self, new_capacity): ...
|
||||
def capacity(self): ...
|
||||
def shrink_to_fit(self): ...
|
||||
def begin(self, *args): ...
|
||||
def cbegin(self): ...
|
||||
def end(self, *args): ...
|
||||
def cend(self): ...
|
||||
def rbegin(self, *args): ...
|
||||
def crbegin(self): ...
|
||||
def rend(self, *args): ...
|
||||
def crend(self): ...
|
||||
def clear(self): ...
|
||||
def insert(self, value): ...
|
||||
def erase(self, *args): ...
|
||||
def count(self, key): ...
|
||||
def find(self, *args): ...
|
||||
def at(self, *args): ...
|
||||
def __contains__(self, key): ...
|
||||
def __len__(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __setitem__(self, key, v): ...
|
||||
def __delitem__(self, key): ...
|
||||
def __iter__(self): ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
cvar = ...
|
||||
msg_err_exact_one_object = ...
|
||||
|
||||
class PreserveOrderMapStringPreserveOrderMapStringString:
|
||||
r"""
|
||||
PreserveOrderMap is an associative container that contains key-value pairs with unique unique keys.
|
||||
It is similar to standard std::map. But it preserves the order of items and the complexity is linear.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def max_size(self): ...
|
||||
def reserve(self, new_capacity): ...
|
||||
def capacity(self): ...
|
||||
def shrink_to_fit(self): ...
|
||||
def begin(self, *args): ...
|
||||
def cbegin(self): ...
|
||||
def end(self, *args): ...
|
||||
def cend(self): ...
|
||||
def rbegin(self, *args): ...
|
||||
def crbegin(self): ...
|
||||
def rend(self, *args): ...
|
||||
def crend(self): ...
|
||||
def clear(self): ...
|
||||
def insert(self, value): ...
|
||||
def erase(self, *args): ...
|
||||
def count(self, key): ...
|
||||
def find(self, *args): ...
|
||||
def at(self, *args): ...
|
||||
def __contains__(self, key): ...
|
||||
def __len__(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __setitem__(self, key, v): ...
|
||||
def __delitem__(self, key): ...
|
||||
def __iter__(self): ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
792
typings/libdnf5/comps.pyi
Normal file
792
typings/libdnf5/comps.pyi
Normal file
|
|
@ -0,0 +1,792 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Iterator
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class SwigPyIterator:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def value(self): ...
|
||||
def incr(self, n=...): ...
|
||||
def decr(self, n=...): ...
|
||||
def distance(self, x): ...
|
||||
def equal(self, x): ...
|
||||
def copy(self): ...
|
||||
def next(self): ...
|
||||
def __next__(self): ...
|
||||
def previous(self): ...
|
||||
def advance(self, n): ...
|
||||
def __eq__(self, x) -> bool: ...
|
||||
def __ne__(self, x) -> bool: ...
|
||||
def __iadd__(self, n): ...
|
||||
def __isub__(self, n): ...
|
||||
def __add__(self, n): ...
|
||||
def __sub__(self, *args): ...
|
||||
def __iter__(self): # -> Self:
|
||||
...
|
||||
|
||||
PackageType_CONDITIONAL: int = ...
|
||||
PackageType_DEFAULT: int = ...
|
||||
PackageType_MANDATORY: int = ...
|
||||
PackageType_OPTIONAL: int = ...
|
||||
|
||||
class InvalidPackageType:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def get_domain_name(self): ...
|
||||
def get_name(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def __or__(a, b): ...
|
||||
def __ior__(a, b): ...
|
||||
def __and__(a, b): ...
|
||||
def any(flags): ...
|
||||
def package_type_from_string(*args): ...
|
||||
def package_type_to_string(type): ...
|
||||
def package_types_to_strings(types): ...
|
||||
|
||||
class Package:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, name, type, condition) -> None: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def get_name(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Package name.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def set_name(self, value): ...
|
||||
def get_type(self):
|
||||
r"""
|
||||
:rtype: int
|
||||
:return: The PackageType.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def set_type(self, value): ...
|
||||
def get_type_string(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: std::string that corresponds to the PackageType.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_condition(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The condition (name of package) under which the package gets installed.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def set_condition(self, value): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class GroupId:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
id = ...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Group:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def get_groupid(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Group id.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_name(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Group name.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_description(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Group description.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_translated_name(self, *args): ...
|
||||
def get_translated_description(self, *args): ...
|
||||
def get_order(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Group display order.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_langonly(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Group langonly.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_uservisible(self):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if the Group is visible to the users.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_default(self):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if the Group is installed by default.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_packages(self):
|
||||
r"""
|
||||
:rtype: std::vector< libdnf5::comps::Package,std::allocator< libdnf5::comps::Package > >
|
||||
:return: std::vector of Packages belonging to the Group.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_packages_of_type(self, type):
|
||||
r"""
|
||||
:rtype: std::vector< libdnf5::comps::Package,std::allocator< libdnf5::comps::Package > >
|
||||
:return: std::vector of Packages of given type belonging to the Group.
|
||||
:type type: int
|
||||
:param type: One of the PackageTypes.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_repos(self):
|
||||
r"""
|
||||
:rtype: std::set< std::string,std::less< std::string >,std::allocator< std::string > >
|
||||
:return: std::set of names of repositories that contain the Group.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_installed(self):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if the Group is installed (belongs to the @System repo).
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_reason(self):
|
||||
r"""
|
||||
:rtype: int
|
||||
:return: Resolved reason why the Group was installed.
|
||||
Groups can be installed due to multiple reasons, only the most significant is returned.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def __iadd__(self, rhs):
|
||||
r"""
|
||||
Merge the Group with another one.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def __eq__(self, rhs) -> bool: ...
|
||||
def __ne__(self, rhs) -> bool: ...
|
||||
def __lt__(self, rhs) -> bool: ...
|
||||
def serialize(self, path):
|
||||
r"""
|
||||
Serialize the Group into an xml file.
|
||||
:type path: string
|
||||
:param path: Path of the output xml file.
|
||||
:raises: utils::xml::XMLSaveError When saving of the file fails.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorPackage:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SetConstIteratorGroup:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def value(self): ...
|
||||
def next(self): ...
|
||||
def prev(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SetGroup:
|
||||
r"""
|
||||
Set represents set of objects (e.g. repositories, or groups)
|
||||
and implements set operations such as unions or differences.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def clear(self): ...
|
||||
def add(self, *args): ...
|
||||
def remove(self, obj): ...
|
||||
def find(self, obj): ...
|
||||
def contains(self, obj): ...
|
||||
def __ior__(self, other): ...
|
||||
def __iand__(self, other): ...
|
||||
def __isub__(self, other): ...
|
||||
def __ixor__(self, other): ...
|
||||
def update(self, other): ...
|
||||
def intersection(self, other): ...
|
||||
def difference(self, other): ...
|
||||
def symmetric_difference(self, other): ...
|
||||
def is_subset(self, other): ...
|
||||
def is_superset(self, other): ...
|
||||
def swap(self, other): ...
|
||||
def get_data(self, *args): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self) -> Iterator[Group]: ...
|
||||
|
||||
class SackQueryGroup(SetGroup):
|
||||
r"""Query is a Set with filtering capabilities."""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def filter(self, *args): ...
|
||||
def get(self):
|
||||
r"""Get a single object. Raise an exception if none or multiple objects match the query."""
|
||||
...
|
||||
|
||||
def list(self):
|
||||
r"""List all objects matching the query."""
|
||||
...
|
||||
|
||||
def get_data(self, *args): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class GroupQuery(SackQueryGroup):
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def filter_groupid(self, *args): ...
|
||||
def filter_package_name(self, *args):
|
||||
r"""
|
||||
Filter groups by packages they contain. Keep only groups that contain packages with given names.
|
||||
|
||||
:type patterns: std::vector< std::string,std::allocator< std::string > >
|
||||
:param patterns: A vector of strings (package names) the filter is matched against.
|
||||
:param cmp_type: A comparison (match) operator, defaults to `QueryCmp::EQ`.
|
||||
Since: 5.12
|
||||
"""
|
||||
...
|
||||
|
||||
def filter_name(self, *args): ...
|
||||
def filter_uservisible(self, value): ...
|
||||
def filter_default(self, value): ...
|
||||
def filter_installed(self, value): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SackGroup:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def size(self): ...
|
||||
def get_excludes(self): ...
|
||||
def add_excludes(self, value): ...
|
||||
def remove_excludes(self, value): ...
|
||||
def set_excludes(self, value): ...
|
||||
def get_includes(self): ...
|
||||
def add_includes(self, value): ...
|
||||
def remove_includes(self, value): ...
|
||||
def set_includes(self, value): ...
|
||||
def get_use_includes(self): ...
|
||||
def set_use_includes(self, value): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class GroupSack(SackGroup):
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def get_weak_ptr(self):
|
||||
r"""Create WeakPtr to GroupSack"""
|
||||
...
|
||||
|
||||
def get_reasons(self): ...
|
||||
|
||||
class GroupSackWeakPtr:
|
||||
r"""
|
||||
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
|
||||
WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
|
||||
WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
|
||||
the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
|
||||
Note on thread safety:
|
||||
It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def __deref__(self):
|
||||
r"""Provides access to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def get(self):
|
||||
r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def is_valid(self):
|
||||
r"""Checks if managed object is valid."""
|
||||
...
|
||||
|
||||
def has_same_guard(self, other):
|
||||
r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
|
||||
...
|
||||
|
||||
def __ref__(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def get_weak_ptr(self):
|
||||
r"""Create WeakPtr to GroupSack"""
|
||||
...
|
||||
|
||||
def get_reasons(self): ...
|
||||
def size(self): ...
|
||||
def get_excludes(self): ...
|
||||
def add_excludes(self, value): ...
|
||||
def remove_excludes(self, value): ...
|
||||
def set_excludes(self, value): ...
|
||||
def get_includes(self): ...
|
||||
def add_includes(self, value): ...
|
||||
def remove_includes(self, value): ...
|
||||
def set_includes(self, value): ...
|
||||
def get_use_includes(self): ...
|
||||
def set_use_includes(self, value): ...
|
||||
|
||||
class EnvironmentId:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
id = ...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Environment:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def get_environmentid(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Environment id.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_name(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Environment name.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_description(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Environment description.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_translated_name(self, *args): ...
|
||||
def get_translated_description(self, *args): ...
|
||||
def get_order(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: The Environment display order.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_groups(self):
|
||||
r"""
|
||||
:rtype: std::vector< std::string,std::allocator< std::string > >
|
||||
:return: std::vector of Group ids belonging to the Environment.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_optional_groups(self):
|
||||
r"""
|
||||
:rtype: std::vector< std::string,std::allocator< std::string > >
|
||||
:return: std::vector of optional Group ids belonging to the Environment.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_repos(self):
|
||||
r"""
|
||||
:rtype: std::set< std::string,std::less< std::string >,std::allocator< std::string > >
|
||||
:return: std::set of names of repositories that contain the Environment.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_installed(self):
|
||||
r"""
|
||||
:rtype: boolean
|
||||
:return: `true` if the Environment is installed (belongs to the @System repo).
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def get_reason(self):
|
||||
r"""
|
||||
:rtype: int
|
||||
:return: Resolved reason why the Environment was installed.
|
||||
Environments can be installed due to multiple reasons, only the most significant is returned.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def __iadd__(self, rhs):
|
||||
r"""
|
||||
Merge the Environment with another one.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
def __eq__(self, rhs) -> bool: ...
|
||||
def __ne__(self, rhs) -> bool: ...
|
||||
def __lt__(self, rhs) -> bool: ...
|
||||
def serialize(self, path):
|
||||
r"""
|
||||
Serialize the Environment into an xml file
|
||||
:type path: string
|
||||
:param path: Path of the output xml file.
|
||||
:raises: utils::xml::XMLSaveError When saving of the file fails.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SetConstIteratorEnvironment:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def value(self): ...
|
||||
def next(self): ...
|
||||
def prev(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SetEnvironment:
|
||||
r"""
|
||||
Set represents set of objects (e.g. repositories, or groups)
|
||||
and implements set operations such as unions or differences.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def clear(self): ...
|
||||
def add(self, *args): ...
|
||||
def remove(self, obj): ...
|
||||
def find(self, obj): ...
|
||||
def contains(self, obj): ...
|
||||
def __ior__(self, other): ...
|
||||
def __iand__(self, other): ...
|
||||
def __isub__(self, other): ...
|
||||
def __ixor__(self, other): ...
|
||||
def update(self, other): ...
|
||||
def intersection(self, other): ...
|
||||
def difference(self, other): ...
|
||||
def symmetric_difference(self, other): ...
|
||||
def is_subset(self, other): ...
|
||||
def is_superset(self, other): ...
|
||||
def swap(self, other): ...
|
||||
def get_data(self, *args): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def __len__(self): ...
|
||||
|
||||
def __eq__(*args) -> bool: ...
|
||||
|
||||
class SackQueryEnvironment(SetEnvironment):
|
||||
r"""Query is a Set with filtering capabilities."""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def filter(self, *args): ...
|
||||
def get(self):
|
||||
r"""Get a single object. Raise an exception if none or multiple objects match the query."""
|
||||
...
|
||||
|
||||
def list(self):
|
||||
r"""List all objects matching the query."""
|
||||
...
|
||||
|
||||
def get_data(self, *args): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class EnvironmentQuery(SackQueryEnvironment):
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def filter_environmentid(self, *args): ...
|
||||
def filter_name(self, *args): ...
|
||||
def filter_installed(self, value): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class SackEnvironment:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def size(self): ...
|
||||
def get_excludes(self): ...
|
||||
def add_excludes(self, value): ...
|
||||
def remove_excludes(self, value): ...
|
||||
def set_excludes(self, value): ...
|
||||
def get_includes(self): ...
|
||||
def add_includes(self, value): ...
|
||||
def remove_includes(self, value): ...
|
||||
def set_includes(self, value): ...
|
||||
def get_use_includes(self): ...
|
||||
def set_use_includes(self, value): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class EnvironmentSack(SackEnvironment):
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def get_weak_ptr(self):
|
||||
r"""Create WeakPtr to EnvironmentSack"""
|
||||
...
|
||||
|
||||
def get_reasons(self): ...
|
||||
|
||||
class EnvironmentSackWeakPtr:
|
||||
r"""
|
||||
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
|
||||
WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
|
||||
WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
|
||||
the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
|
||||
Note on thread safety:
|
||||
It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def __deref__(self):
|
||||
r"""Provides access to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def get(self):
|
||||
r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def is_valid(self):
|
||||
r"""Checks if managed object is valid."""
|
||||
...
|
||||
|
||||
def has_same_guard(self, other):
|
||||
r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
|
||||
...
|
||||
|
||||
def __ref__(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def get_weak_ptr(self):
|
||||
r"""Create WeakPtr to EnvironmentSack"""
|
||||
...
|
||||
|
||||
def get_reasons(self): ...
|
||||
def size(self): ...
|
||||
def get_excludes(self): ...
|
||||
def add_excludes(self, value): ...
|
||||
def remove_excludes(self, value): ...
|
||||
def set_excludes(self, value): ...
|
||||
def get_includes(self): ...
|
||||
def add_includes(self, value): ...
|
||||
def remove_includes(self, value): ...
|
||||
def set_includes(self, value): ...
|
||||
def get_use_includes(self): ...
|
||||
def set_use_includes(self, value): ...
|
||||
|
||||
def SetEnvironment__iter__(self): # -> Iterator:
|
||||
...
|
||||
|
||||
class Comps:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, base) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def get_group_sack(self): ...
|
||||
def get_environment_sack(self): ...
|
||||
def get_weak_ptr(self): ...
|
||||
def get_base(self): ...
|
||||
|
||||
class CompsWeakPtr:
|
||||
r"""
|
||||
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
|
||||
WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
|
||||
WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
|
||||
the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
|
||||
Note on thread safety:
|
||||
It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def __deref__(self):
|
||||
r"""Provides access to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def get(self):
|
||||
r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def is_valid(self):
|
||||
r"""Checks if managed object is valid."""
|
||||
...
|
||||
|
||||
def has_same_guard(self, other):
|
||||
r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
|
||||
...
|
||||
|
||||
def __ref__(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def get_group_sack(self): ...
|
||||
def get_environment_sack(self): ...
|
||||
def get_weak_ptr(self): ...
|
||||
def get_base(self): ...
|
||||
2022
typings/libdnf5/conf.pyi
Normal file
2022
typings/libdnf5/conf.pyi
Normal file
File diff suppressed because it is too large
Load diff
302
typings/libdnf5/logger.pyi
Normal file
302
typings/libdnf5/logger.pyi
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class LoggerUniquePtr:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __deref__(self): ...
|
||||
def release(self): ...
|
||||
def reset(self, __p=...): ...
|
||||
def swap(self, __u): ...
|
||||
def get(self): ...
|
||||
def __nonzero__(self): ...
|
||||
|
||||
__bool__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def level_to_cstr(self, level): ...
|
||||
def log_line(self, level, message): ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
def critical(self, msg): ...
|
||||
def error(self, msg): ...
|
||||
def warning(self, msg): ...
|
||||
def notice(self, msg): ...
|
||||
def info(self, msg): ...
|
||||
def debug(self, msg): ...
|
||||
def trace(self, msg): ...
|
||||
def log(self, level, msg): ...
|
||||
|
||||
class MemoryBufferLoggerUniquePtr:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def __deref__(self): ...
|
||||
def release(self): ...
|
||||
def reset(self, __p=...): ...
|
||||
def swap(self, __u): ...
|
||||
def get(self): ...
|
||||
def __nonzero__(self): ...
|
||||
|
||||
__bool__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
def get_items_count(self): ...
|
||||
def get_item(self, item_idx): ...
|
||||
def clear(self): ...
|
||||
def write_to_logger(self, logger): ...
|
||||
def level_to_cstr(self, level): ...
|
||||
def log_line(self, level, message): ...
|
||||
def critical(self, msg): ...
|
||||
def error(self, msg): ...
|
||||
def warning(self, msg): ...
|
||||
def notice(self, msg): ...
|
||||
def info(self, msg): ...
|
||||
def debug(self, msg): ...
|
||||
def trace(self, msg): ...
|
||||
def log(self, level, msg): ...
|
||||
|
||||
class LogRouterWeakPtr:
|
||||
r"""
|
||||
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
|
||||
WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
|
||||
WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
|
||||
the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
|
||||
Note on thread safety:
|
||||
It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def __deref__(self):
|
||||
r"""Provides access to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def get(self):
|
||||
r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def is_valid(self):
|
||||
r"""Checks if managed object is valid."""
|
||||
...
|
||||
|
||||
def has_same_guard(self, other):
|
||||
r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
|
||||
...
|
||||
|
||||
def __ref__(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def add_logger(self, logger):
|
||||
r"""Moves (registers) the "logger" into the log router. It gets next free index number."""
|
||||
...
|
||||
|
||||
def get_logger(self, index):
|
||||
r"""Returns pointer to the logger at the "index" position."""
|
||||
...
|
||||
|
||||
def release_logger(self, index):
|
||||
r"""
|
||||
Removes logger at the "index" position from LogRouter.
|
||||
The array of the loggers is squeezed. Index of the loggers behind removed logger is decreased by one.
|
||||
"""
|
||||
...
|
||||
|
||||
def swap_logger(self, logger, index):
|
||||
r"""Swaps the logger at the "index" position with another "logger"."""
|
||||
...
|
||||
|
||||
def get_loggers_count(self):
|
||||
r"""Returns number of loggers registered in LogRouter."""
|
||||
...
|
||||
|
||||
def log_line(self, level, message): ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
def level_to_cstr(self, level): ...
|
||||
def critical(self, msg): ...
|
||||
def error(self, msg): ...
|
||||
def warning(self, msg): ...
|
||||
def notice(self, msg): ...
|
||||
def info(self, msg): ...
|
||||
def debug(self, msg): ...
|
||||
def trace(self, msg): ...
|
||||
def log(self, level, msg): ...
|
||||
|
||||
class Logger:
|
||||
r"""
|
||||
Logger is an abstract interface used for logging.
|
||||
An implementation (inherited class) can call callbacks, log the messages to memory, file, or somewhere else.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
Level_CRITICAL = ...
|
||||
Level_ERROR = ...
|
||||
Level_WARNING = ...
|
||||
Level_NOTICE = ...
|
||||
Level_INFO = ...
|
||||
Level_DEBUG = ...
|
||||
Level_TRACE = ...
|
||||
@staticmethod
|
||||
def level_to_cstr(level): ...
|
||||
def log_line(self, level, message): ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
def critical(self, msg): ...
|
||||
def error(self, msg): ...
|
||||
def warning(self, msg): ...
|
||||
def notice(self, msg): ...
|
||||
def info(self, msg): ...
|
||||
def debug(self, msg): ...
|
||||
def trace(self, msg): ...
|
||||
def log(self, level, msg): ...
|
||||
def __disown__(self): # -> Any:
|
||||
...
|
||||
|
||||
class StringLogger(Logger):
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def write(self, *args): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class LogRouter(Logger):
|
||||
r"""
|
||||
LogRouter is an implementation of logging class that forwards incoming logging messages to several other loggers.
|
||||
Loggers can be addressed via index. Index is serial number of the logger starting from zero.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None:
|
||||
r"""
|
||||
*Overload 1:*
|
||||
Constructs a new LogRouter instance with an empty set of destination loggers.
|
||||
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
Constructs a new LogRouter instance and sets the destination loggers.
|
||||
"""
|
||||
...
|
||||
|
||||
def add_logger(self, logger):
|
||||
r"""Moves (registers) the "logger" into the log router. It gets next free index number."""
|
||||
...
|
||||
|
||||
def get_logger(self, index):
|
||||
r"""Returns pointer to the logger at the "index" position."""
|
||||
...
|
||||
|
||||
def release_logger(self, index):
|
||||
r"""
|
||||
Removes logger at the "index" position from LogRouter.
|
||||
The array of the loggers is squeezed. Index of the loggers behind removed logger is decreased by one.
|
||||
"""
|
||||
...
|
||||
|
||||
def swap_logger(self, logger, index):
|
||||
r"""Swaps the logger at the "index" position with another "logger"."""
|
||||
...
|
||||
|
||||
def get_loggers_count(self):
|
||||
r"""Returns number of loggers registered in LogRouter."""
|
||||
...
|
||||
|
||||
def log_line(self, level, message): ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class GlobalLogger:
|
||||
r"""
|
||||
GlobalLogger contains methods for setting the target (logger) for global messages - messages that are
|
||||
generated by libraries (eg librepo) without binding to the Base object.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
@staticmethod
|
||||
def set(destination, verbosity): ...
|
||||
@staticmethod
|
||||
def unset(): ...
|
||||
|
||||
class MemoryBufferLogger(Logger):
|
||||
r"""
|
||||
MemoryBufferLogger is an implementation of logging class that stores incoming logging messages into memory buffer.
|
||||
It is usually used as temporary logger until a final logger is configured.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, max_items_to_keep, reserve=...) -> None: ...
|
||||
def write(self, time, pid, level, message): ...
|
||||
def get_items_count(self): ...
|
||||
def get_item(self, item_idx): ...
|
||||
def clear(self): ...
|
||||
def write_to_logger(self, logger): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def create_file_logger(*args):
|
||||
r"""
|
||||
*Overload 1:*
|
||||
Deprecated: It is going to be removed.
|
||||
Helper method for creating a file logger.
|
||||
:type base: libdnf5::Base
|
||||
:param base: Reference to Base for loading the configured logger path.
|
||||
:rtype: std::unique_ptr< libdnf5::Logger >
|
||||
:return: Instance of a new file logger.
|
||||
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
Helper method for creating a file logger in `logdir` location with given file name.
|
||||
:type base: libdnf5::Base
|
||||
:param base: Reference to Base for loading the configured logger path.
|
||||
:type filename: string
|
||||
:param filename: Name of the log file.
|
||||
:rtype: std::unique_ptr< libdnf5::Logger >
|
||||
:return: Instance of a new file logger.
|
||||
"""
|
||||
...
|
||||
|
||||
def create_rotating_file_logger(base, filename):
|
||||
r"""
|
||||
Helper method for creating a rotating file logger in `logdir` location with given file name.
|
||||
:type base: libdnf5::Base
|
||||
:param base: Reference to Base for loading the configured parameters.
|
||||
:type filename: string
|
||||
:param filename: Name of the log file.
|
||||
:rtype: std::unique_ptr< libdnf5::Logger >
|
||||
:return: Instance of a new rotating file logger.
|
||||
"""
|
||||
...
|
||||
|
||||
cvar = ...
|
||||
FILE_LOGGER_FILENAME = ...
|
||||
109
typings/libdnf5/plugin.pyi
Normal file
109
typings/libdnf5/plugin.pyi
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class Version:
|
||||
r"""Plugin version"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
major = ...
|
||||
minor = ...
|
||||
micro = ...
|
||||
def __init__(self, major, minor, micro) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class IPlugin:
|
||||
r"""A base class for implementing LIBDNF5 plugins that introduce additional logic into the library using hooks."""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, base) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def get_api_version(self):
|
||||
r"""Returns the version of the API supported by the plugin. It can be called at any time."""
|
||||
...
|
||||
|
||||
def get_name(self):
|
||||
r"""Returns the name of the plugin. It can be called at any time."""
|
||||
...
|
||||
|
||||
def get_version(self):
|
||||
r"""Gets the plugin version. It can be called at any time."""
|
||||
...
|
||||
|
||||
def get_attributes(self):
|
||||
r"""
|
||||
:rtype: string
|
||||
:return: A nullptr terminated array of attributes supported by the plugin.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_attribute(self, name):
|
||||
r"""
|
||||
Gets the value of the attribute from the plugin. Returns nullptr if the attribute does not exist.
|
||||
It can be called at any time.
|
||||
"""
|
||||
...
|
||||
|
||||
def load_plugins(self):
|
||||
r"""
|
||||
The plugin can load additional plugins. E.g. C++ plugin for loading Python plugins.
|
||||
Called before init.
|
||||
"""
|
||||
...
|
||||
|
||||
def init(self):
|
||||
r"""
|
||||
Plugin initialization.
|
||||
Called before hooks.
|
||||
"""
|
||||
...
|
||||
|
||||
def pre_base_setup(self):
|
||||
r"""
|
||||
The pre_base_setup hook.
|
||||
It is called at the beginning of the `Base::setup` method (after the `init` hook).
|
||||
"""
|
||||
...
|
||||
|
||||
def post_base_setup(self):
|
||||
r"""
|
||||
The post_base_setup hook.
|
||||
It is called at the end of the `Base::setup` method.
|
||||
"""
|
||||
...
|
||||
|
||||
def pre_transaction(self, arg0):
|
||||
r"""
|
||||
The pre_transaction hook.
|
||||
It is called just before the actual transaction starts.
|
||||
"""
|
||||
...
|
||||
|
||||
def post_transaction(self, arg0):
|
||||
r"""
|
||||
The post_transaction hook.
|
||||
It is called after transactions.
|
||||
"""
|
||||
...
|
||||
|
||||
def finish(self):
|
||||
r"""Finish the plugin and release all resources obtained by the init method and in hooks."""
|
||||
...
|
||||
|
||||
def get_base(self): ...
|
||||
def __disown__(self): # -> Any:
|
||||
...
|
||||
2121
typings/libdnf5/repo.pyi
Normal file
2121
typings/libdnf5/repo.pyi
Normal file
File diff suppressed because it is too large
Load diff
2819
typings/libdnf5/rpm.pyi
Normal file
2819
typings/libdnf5/rpm.pyi
Normal file
File diff suppressed because it is too large
Load diff
547
typings/libdnf5/transaction.pyi
Normal file
547
typings/libdnf5/transaction.pyi
Normal file
|
|
@ -0,0 +1,547 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
if __package__ or "." in __name__:
|
||||
...
|
||||
else:
|
||||
...
|
||||
|
||||
class _SwigNonDynamicMeta(type):
|
||||
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
|
||||
|
||||
__setattr__ = ...
|
||||
|
||||
class SwigPyIterator:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def value(self): ...
|
||||
def incr(self, n=...): ...
|
||||
def decr(self, n=...): ...
|
||||
def distance(self, x): ...
|
||||
def equal(self, x): ...
|
||||
def copy(self): ...
|
||||
def next(self): ...
|
||||
def __next__(self): ...
|
||||
def previous(self): ...
|
||||
def advance(self, n): ...
|
||||
def __eq__(self, x) -> bool: ...
|
||||
def __ne__(self, x) -> bool: ...
|
||||
def __iadd__(self, n): ...
|
||||
def __isub__(self, n): ...
|
||||
def __add__(self, n): ...
|
||||
def __sub__(self, *args): ...
|
||||
def __iter__(self): # -> Self:
|
||||
...
|
||||
|
||||
TransactionItemAction_INSTALL = ...
|
||||
TransactionItemAction_UPGRADE = ...
|
||||
TransactionItemAction_DOWNGRADE = ...
|
||||
TransactionItemAction_REINSTALL = ...
|
||||
TransactionItemAction_REMOVE = ...
|
||||
TransactionItemAction_REPLACED = ...
|
||||
TransactionItemAction_REASON_CHANGE = ...
|
||||
TransactionItemAction_ENABLE = ...
|
||||
TransactionItemAction_DISABLE = ...
|
||||
TransactionItemAction_RESET = ...
|
||||
|
||||
class InvalidTransactionItemAction:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, action) -> None: ...
|
||||
def get_domain_name(self): ...
|
||||
def get_name(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def transaction_item_action_to_string(action): ...
|
||||
def transaction_item_action_from_string(action): ...
|
||||
def transaction_item_action_to_letter(action): ...
|
||||
def transaction_item_action_is_inbound(action): ...
|
||||
def transaction_item_action_is_outbound(action): ...
|
||||
|
||||
TransactionItemReason_NONE = ...
|
||||
TransactionItemReason_DEPENDENCY = ...
|
||||
TransactionItemReason_USER = ...
|
||||
TransactionItemReason_CLEAN = ...
|
||||
TransactionItemReason_WEAK_DEPENDENCY = ...
|
||||
TransactionItemReason_GROUP = ...
|
||||
TransactionItemReason_EXTERNAL_USER = ...
|
||||
|
||||
class InvalidTransactionItemReason:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, reason) -> None: ...
|
||||
def get_domain_name(self): ...
|
||||
def get_name(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def transaction_item_reason_to_string(reason): ...
|
||||
def transaction_item_reason_from_string(reason): ...
|
||||
def transaction_item_reason_compare(lhs, rhs):
|
||||
r"""
|
||||
Compare transaction items and return:
|
||||
-1 if lhs < rhs
|
||||
1 if lhs > rhs
|
||||
0 if lhs == rhs
|
||||
Higher number means a better (or a stronger) reason.
|
||||
"""
|
||||
...
|
||||
|
||||
def __lt__(lhs, rhs) -> bool: ...
|
||||
def __le__(lhs, rhs) -> bool: ...
|
||||
def __gt__(lhs, rhs) -> bool: ...
|
||||
def __ge__(lhs, rhs) -> bool: ...
|
||||
|
||||
TransactionItemState_STARTED = ...
|
||||
TransactionItemState_OK = ...
|
||||
TransactionItemState_ERROR = ...
|
||||
|
||||
class InvalidTransactionItemState:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, state) -> None: ...
|
||||
def get_domain_name(self): ...
|
||||
def get_name(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
def transaction_item_state_to_string(state): ...
|
||||
def transaction_item_state_from_string(state): ...
|
||||
|
||||
class TransactionItem:
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def get_action(self):
|
||||
r"""Get action associated with the transaction item in the transaction"""
|
||||
...
|
||||
|
||||
def get_reason(self):
|
||||
r"""Get reason of the action associated with the transaction item in the transaction"""
|
||||
...
|
||||
|
||||
def get_repoid(self):
|
||||
r"""Get transaction item repoid (text identifier of a repository)"""
|
||||
...
|
||||
|
||||
def get_state(self):
|
||||
r"""Get transaction item state"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class CompsGroup(TransactionItem):
|
||||
r"""
|
||||
CompsGroup contains a copy of important data from comps::CompsGroup that is used
|
||||
to perform comps transaction and then stored in the transaction (history) database.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def to_string(self):
|
||||
r"""Get string representation of the object, which equals to group_id"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class CompsGroupPackage:
|
||||
r"""CompsGroupPackage represents a package associated with a comps group"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class CompsEnvironment(TransactionItem):
|
||||
r"""
|
||||
CompsEnvironment contains a copy of important data from comps::CompsEnvironment that is used
|
||||
to perform comps transaction and then stored in the transaction (history) database.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def to_string(self):
|
||||
r"""Get string representation of the object, which equals to environment_id"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class CompsEnvironmentGroup:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Package(TransactionItem):
|
||||
r"""
|
||||
Package contains a copy of important data from rpm::Package that is used
|
||||
to perform rpm transaction and then stored in the transaction (history) database.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
def get_name(self):
|
||||
r"""Get package name"""
|
||||
...
|
||||
|
||||
def get_epoch(self):
|
||||
r"""Get package epoch"""
|
||||
...
|
||||
|
||||
def get_release(self):
|
||||
r"""Get package release"""
|
||||
...
|
||||
|
||||
def get_arch(self):
|
||||
r"""Get package arch"""
|
||||
...
|
||||
|
||||
def get_version(self):
|
||||
r"""Get package version"""
|
||||
...
|
||||
|
||||
def to_string(self):
|
||||
r"""Get string representation of the object, which equals to package NEVRA"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class TransactionHistory:
|
||||
r"""A class for working with transactions recorded in the transaction history database."""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def get_weak_ptr(self): ...
|
||||
def list_transaction_ids(self):
|
||||
r"""
|
||||
Lists all transaction IDs from the transaction history database. The
|
||||
result is sorted in ascending order.
|
||||
|
||||
:rtype: std::vector< int64_t,std::allocator< int64_t > >
|
||||
:return: The list of transaction IDs.
|
||||
"""
|
||||
...
|
||||
|
||||
def list_transactions(self, *args):
|
||||
r"""
|
||||
*Overload 1:*
|
||||
Lists transactions from the transaction history for transaction ids in `ids`.
|
||||
|
||||
:type ids: std::vector< int64_t,std::allocator< int64_t > >
|
||||
:param ids: The ids to list.
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
Lists transactions from the transaction history for transaction ids
|
||||
within the [start, end] range (inclusive).
|
||||
|
||||
:type start: int
|
||||
:param start: The first id of the range to be listed.
|
||||
:type end: int
|
||||
:param end: The last id of the range to be listed.
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
"""
|
||||
...
|
||||
|
||||
def list_all_transactions(self):
|
||||
r"""
|
||||
Lists all transactions from the transaction history.
|
||||
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_base(self):
|
||||
r"""
|
||||
:rtype: libdnf5::BaseWeakPtr
|
||||
:return: The `Base` object to which this object belongs.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class TransactionHistoryWeakPtr:
|
||||
r"""
|
||||
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
|
||||
WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
|
||||
WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
|
||||
the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
|
||||
Note on thread safety:
|
||||
It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
def __deref__(self):
|
||||
r"""Provides access to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def get(self):
|
||||
r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
|
||||
...
|
||||
|
||||
def is_valid(self):
|
||||
r"""Checks if managed object is valid."""
|
||||
...
|
||||
|
||||
def has_same_guard(self, other):
|
||||
r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
|
||||
...
|
||||
|
||||
def __ref__(self): ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __ne__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def __le__(self, other) -> bool: ...
|
||||
def __ge__(self, other) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def get_weak_ptr(self): ...
|
||||
def list_transaction_ids(self):
|
||||
r"""
|
||||
Lists all transaction IDs from the transaction history database. The
|
||||
result is sorted in ascending order.
|
||||
|
||||
:rtype: std::vector< int64_t,std::allocator< int64_t > >
|
||||
:return: The list of transaction IDs.
|
||||
"""
|
||||
...
|
||||
|
||||
def list_transactions(self, *args):
|
||||
r"""
|
||||
*Overload 1:*
|
||||
Lists transactions from the transaction history for transaction ids in `ids`.
|
||||
|
||||
:type ids: std::vector< int64_t,std::allocator< int64_t > >
|
||||
:param ids: The ids to list.
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
Lists transactions from the transaction history for transaction ids
|
||||
within the [start, end] range (inclusive).
|
||||
|
||||
:type start: int
|
||||
:param start: The first id of the range to be listed.
|
||||
:type end: int
|
||||
:param end: The last id of the range to be listed.
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
"""
|
||||
...
|
||||
|
||||
def list_all_transactions(self):
|
||||
r"""
|
||||
Lists all transactions from the transaction history.
|
||||
|
||||
:rtype: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
|
||||
:return: The listed transactions.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_base(self):
|
||||
r"""
|
||||
:rtype: libdnf5::BaseWeakPtr
|
||||
:return: The `Base` object to which this object belongs.
|
||||
Since: 5.0
|
||||
"""
|
||||
...
|
||||
|
||||
TransactionState_STARTED = ...
|
||||
TransactionState_OK = ...
|
||||
TransactionState_ERROR = ...
|
||||
|
||||
def transaction_state_to_string(state): ...
|
||||
def transaction_state_from_string(state): ...
|
||||
|
||||
class InvalidTransactionState:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def __init__(self, state) -> None: ...
|
||||
def get_domain_name(self): ...
|
||||
def get_name(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class Transaction:
|
||||
r"""
|
||||
Transaction holds information about a transaction.
|
||||
It contains transaction items such as packages, comps groups and environments.
|
||||
Transaction object are used to retrieve information about past transactions
|
||||
from the transaction history database as well as for performing a transaction
|
||||
to change packages on disk.
|
||||
"""
|
||||
|
||||
thisown = ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
__repr__ = ...
|
||||
__swig_destroy__ = ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __lt__(self, other) -> bool: ...
|
||||
def __gt__(self, other) -> bool: ...
|
||||
def get_id(self):
|
||||
r"""
|
||||
Get Transaction database id (primary key)
|
||||
Return 0 if the id wasn't set yet
|
||||
"""
|
||||
...
|
||||
|
||||
def get_dt_start(self):
|
||||
r"""Get date and time of the transaction start"""
|
||||
...
|
||||
|
||||
def get_dt_end(self):
|
||||
r"""Get date and time of the transaction end"""
|
||||
...
|
||||
|
||||
def get_rpmdb_version_begin(self):
|
||||
r"""
|
||||
Get RPM database version before the transaction
|
||||
Format: `<rpm_count>`:`<sha1 of sorted SHA1HEADER fields of installed RPMs>`
|
||||
"""
|
||||
...
|
||||
|
||||
def get_rpmdb_version_end(self):
|
||||
r"""
|
||||
Get RPM database version after the transaction
|
||||
Format: `<rpm_count>`:`<sha1 of sorted SHA1HEADER fields of installed RPMs>`
|
||||
"""
|
||||
...
|
||||
|
||||
def get_releasever(self):
|
||||
r"""Get $releasever variable value that was used during the transaction"""
|
||||
...
|
||||
|
||||
def get_user_id(self):
|
||||
r"""Get UID of a user that started the transaction"""
|
||||
...
|
||||
|
||||
def get_description(self):
|
||||
r"""Get the description of the transaction (e.g. the CLI command that was executed)"""
|
||||
...
|
||||
|
||||
def get_comment(self):
|
||||
r"""Get a user-specified comment describing the transaction"""
|
||||
...
|
||||
|
||||
def get_state(self):
|
||||
r"""Get transaction state"""
|
||||
...
|
||||
|
||||
def get_comps_environments(self):
|
||||
r"""Return all comps environments associated with the transaction"""
|
||||
...
|
||||
|
||||
def get_comps_groups(self):
|
||||
r"""Return all comps groups associated with the transaction"""
|
||||
...
|
||||
|
||||
def get_packages(self):
|
||||
r"""Return all rpm packages associated with the transaction"""
|
||||
...
|
||||
|
||||
def serialize(self):
|
||||
r"""
|
||||
Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
|
||||
Serialize the transaction into a json data format which can be later loaded
|
||||
into a `libdnf5::Goal` and replayed.
|
||||
"""
|
||||
...
|
||||
|
||||
class VectorTransaction:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
|
||||
class VectorTransactionPackage:
|
||||
thisown = ...
|
||||
__repr__ = ...
|
||||
def iterator(self): ...
|
||||
def __iter__(self): ...
|
||||
def __nonzero__(self): ...
|
||||
def __bool__(self): ...
|
||||
def __len__(self): ...
|
||||
def __getslice__(self, i, j): ...
|
||||
def __setslice__(self, *args): ...
|
||||
def __delslice__(self, i, j): ...
|
||||
def __delitem__(self, *args): ...
|
||||
def __getitem__(self, *args): ...
|
||||
def __setitem__(self, *args): ...
|
||||
def pop(self): ...
|
||||
def append(self, x): ...
|
||||
def empty(self): ...
|
||||
def size(self): ...
|
||||
def swap(self, v): ...
|
||||
def begin(self): ...
|
||||
def end(self): ...
|
||||
def rbegin(self): ...
|
||||
def rend(self): ...
|
||||
def clear(self): ...
|
||||
def get_allocator(self): ...
|
||||
def pop_back(self): ...
|
||||
def erase(self, *args): ...
|
||||
def __init__(self, *args) -> None: ...
|
||||
def push_back(self, x): ...
|
||||
def front(self): ...
|
||||
def back(self): ...
|
||||
def assign(self, n, x): ...
|
||||
def insert(self, *args): ...
|
||||
def reserve(self, n): ...
|
||||
def capacity(self): ...
|
||||
|
||||
__swig_destroy__ = ...
|
||||
10
typings/rpm/__init__.pyi
Normal file
10
typings/rpm/__init__.pyi
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
"""
|
||||
Typing stub for basedypright to ignore all types for RPM module
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
def __getattr__(attr: str) -> Any:
|
||||
return ...
|
||||
Loading…
Add table
Add a link
Reference in a new issue