mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[CI] Format code with Black
This commit is contained in:
parent
2f38639a2e
commit
94bf107838
4 changed files with 8 additions and 10 deletions
|
@ -42,7 +42,9 @@ class BaseSystemDiagnoser(Diagnoser):
|
|||
elif os.path.exists("/sys/devices/virtual/dmi/id/sys_vendor"):
|
||||
model = read_file("/sys/devices/virtual/dmi/id/sys_vendor").strip()
|
||||
if os.path.exists("/sys/devices/virtual/dmi/id/product_name"):
|
||||
product_name = read_file("/sys/devices/virtual/dmi/id/product_name").strip()
|
||||
product_name = read_file(
|
||||
"/sys/devices/virtual/dmi/id/product_name"
|
||||
).strip()
|
||||
model = f"{model} {product_name}"
|
||||
hardware["data"]["model"] = model
|
||||
hardware["details"] = ["diagnosis_basesystem_hardware_model"]
|
||||
|
|
|
@ -262,9 +262,7 @@ def dyndns_update(
|
|||
else:
|
||||
return None
|
||||
|
||||
raise YunohostError(
|
||||
f"Failed to resolve {rdtype} for {domain}", raw_msg=True
|
||||
)
|
||||
raise YunohostError(f"Failed to resolve {rdtype} for {domain}", raw_msg=True)
|
||||
|
||||
old_ipv4 = resolve_domain(domain, "A")
|
||||
old_ipv6 = resolve_domain(domain, "AAAA")
|
||||
|
|
|
@ -1013,9 +1013,7 @@ def test_permission_app_install():
|
|||
assert res["permissions_app.dev"]["url"] == "/dev"
|
||||
|
||||
assert res["permissions_app.main"]["allowed"] == ["all_users"]
|
||||
assert set(res["permissions_app.main"]["corresponding_users"]) == {
|
||||
"alice", "bob"
|
||||
}
|
||||
assert set(res["permissions_app.main"]["corresponding_users"]) == {"alice", "bob"}
|
||||
|
||||
assert res["permissions_app.admin"]["allowed"] == ["alice"]
|
||||
assert res["permissions_app.admin"]["corresponding_users"] == ["alice"]
|
||||
|
|
Loading…
Add table
Reference in a new issue