🎨 Format Python code with Black

This commit is contained in:
alexAubin 2024-07-23 18:50:18 +00:00 committed by github-actions[bot]
parent b6e024c395
commit 484da40508

View file

@ -493,7 +493,9 @@ class App(TestSuite):
self.path = path self.path = path
self.manifest_ = Manifest(self.path) self.manifest_ = Manifest(self.path)
self.manifest = self.manifest_.manifest self.manifest = self.manifest_.manifest
self.scripts = {f: Script(self.path, f, self.manifest.get("id")) for f in scriptnames} self.scripts = {
f: Script(self.path, f, self.manifest.get("id")) for f in scriptnames
}
self.configurations = Configurations(self) self.configurations = Configurations(self)
self.app_catalog = AppCatalog(self.manifest["id"]) self.app_catalog = AppCatalog(self.manifest["id"])
@ -1672,8 +1674,13 @@ class Manifest(TestSuite):
"It seems like the upstream section still contains placeholder values such as 'example.com' ..." "It seems like the upstream section still contains placeholder values such as 'example.com' ..."
) )
code = self.manifest["upstream"].get("code") code = self.manifest["upstream"].get("code")
if code and (code == self.manifest["upstream"].get("userdoc") or code == self.manifest["upstream"].get("admindoc")): if code and (
yield Warning("userdoc or admindoc: A code repository is not a documentation x_x") code == self.manifest["upstream"].get("userdoc")
or code == self.manifest["upstream"].get("admindoc")
):
yield Warning(
"userdoc or admindoc: A code repository is not a documentation x_x"
)
@test() @test()
def FIXMEs(self): def FIXMEs(self):
@ -1686,15 +1693,11 @@ class Manifest(TestSuite):
yunohost_version_req = ( yunohost_version_req = (
app.manifest.get("integration", {}).get("yunohost", "").strip(">= ") app.manifest.get("integration", {}).get("yunohost", "").strip(">= ")
) )
if ( if yunohost_version_req.startswith("4."):
yunohost_version_req.startswith("4.")
):
yield Critical( yield Critical(
"Your app only requires yunohost >= 4.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers." "Your app only requires yunohost >= 4.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers."
) )
elif ( elif yunohost_version_req.startswith("11.0"):
yunohost_version_req.startswith("11.0")
):
yield Error( yield Error(
"Your app only requires yunohost >= 11.0, which tends to indicate that it may not be up to date with recommended packaging practices and helpers." "Your app only requires yunohost >= 11.0, which tends to indicate that it may not be up to date with recommended packaging practices and helpers."
) )