mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-07 19:03:38 +00:00
Compare commits
3 Commits
49cf91ea52
...
a7fa3b90e4
| Author | SHA1 | Date | |
|---|---|---|---|
| a7fa3b90e4 | |||
| ce07cda8ab | |||
| 00c4f32294 |
@@ -44,7 +44,7 @@ class AUR(Remote):
|
||||
"""
|
||||
generate remote git url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
repository(str): repository name
|
||||
|
||||
@@ -58,7 +58,7 @@ class AUR(Remote):
|
||||
"""
|
||||
generate remote web url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -46,7 +46,7 @@ class Official(Remote):
|
||||
"""
|
||||
generate remote git url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
repository(str): repository name
|
||||
|
||||
@@ -60,7 +60,7 @@ class Official(Remote):
|
||||
"""
|
||||
generate remote web url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -110,7 +110,7 @@ class Remote(SyncHttpClient):
|
||||
"""
|
||||
generate remote git url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
repository(str): repository name
|
||||
|
||||
@@ -127,7 +127,7 @@ class Remote(SyncHttpClient):
|
||||
"""
|
||||
generate remote web url from the package base
|
||||
|
||||
Args
|
||||
Args:
|
||||
package_base(str): package base
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -109,7 +109,7 @@ class Validator(RootValidator):
|
||||
Args:
|
||||
constraint(list[str]): optional list of allowed special words (e.g. ``localhost``)
|
||||
field(str): field name to be checked
|
||||
value(Path): value to be checked
|
||||
value(str): value to be checked
|
||||
|
||||
Examples:
|
||||
The rule's arguments are validated against this schema:
|
||||
|
||||
@@ -81,7 +81,7 @@ class Spawn(Thread, LazyLogging):
|
||||
helper to run external process
|
||||
|
||||
Args:
|
||||
callback(Callable[[argparse.Namespace, str], bool]): application run function
|
||||
callback(Callable[[argparse.Namespace, RepositoryId], bool]): application run function
|
||||
(i.e. :func:`ahriman.application.handlers.handler.Handler.call()` method)
|
||||
args(argparse.Namespace): command line arguments
|
||||
repository_id(RepositoryId): repository unique identifier
|
||||
|
||||
@@ -184,8 +184,8 @@ class TriggerLoader(LazyLogging):
|
||||
trigger_type = self.load_trigger_class(module_path)
|
||||
try:
|
||||
trigger = trigger_type(repository_id, configuration)
|
||||
except Exception:
|
||||
raise ExtensionError(f"Could not load instance of trigger from {trigger_type} loaded from {module_path}")
|
||||
except Exception as ex:
|
||||
raise ExtensionError(f"Could not load trigger from {trigger_type} loaded from {module_path}") from ex
|
||||
|
||||
return trigger
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class AURPackage:
|
||||
url_path(str): AUR package path
|
||||
repository(str): repository name of the package
|
||||
depends(list[str]): list of package dependencies
|
||||
make_depends(l[str]): list of package make dependencies
|
||||
make_depends(list[str]): list of package make dependencies
|
||||
opt_depends(list[str]): list of package optional dependencies
|
||||
check_depends(list[str]): list of package test dependencies
|
||||
conflicts(list[str]): conflicts list for the package
|
||||
|
||||
@@ -94,7 +94,7 @@ class RepositoryId:
|
||||
TypeError: if other is different from RepositoryId type
|
||||
"""
|
||||
if not isinstance(other, RepositoryId):
|
||||
raise ValueError(f"'<' not supported between instances of '{type(self)}' and '{type(other)}'")
|
||||
raise TypeError(f"'<' not supported between instances of '{type(self)}' and '{type(other)}'")
|
||||
|
||||
return (self.name, self.architecture) < (other.name, other.architecture)
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ def test_lt() -> None:
|
||||
|
||||
def test_lt_invalid() -> None:
|
||||
"""
|
||||
must raise ValueError if other is not valid repository id
|
||||
must raise TypeError if other is not valid repository id
|
||||
"""
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(TypeError):
|
||||
assert RepositoryId("x86_64", "a") < 42
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user