Skip to content

Commit

Permalink
Merge pull request #158 from YunoHost/actions/black
Browse files Browse the repository at this point in the history
Format Python code with Black
  • Loading branch information
alexAubin authored Jul 23, 2024
2 parents b6e024c + 484da40 commit 9f21502
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions package_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ def __init__(self, path):
self.path = path
self.manifest_ = Manifest(self.path)
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.app_catalog = AppCatalog(self.manifest["id"])

Expand Down Expand Up @@ -1672,8 +1674,13 @@ def upstream_placeholders(self):
"It seems like the upstream section still contains placeholder values such as 'example.com' ..."
)
code = self.manifest["upstream"].get("code")
if code and (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")
if code and (
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()
def FIXMEs(self):
Expand All @@ -1686,15 +1693,11 @@ def yunohost_version_requirement_superold(app):
yunohost_version_req = (
app.manifest.get("integration", {}).get("yunohost", "").strip(">= ")
)
if (
yunohost_version_req.startswith("4.")
):
if yunohost_version_req.startswith("4."):
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."
)
elif (
yunohost_version_req.startswith("11.0")
):
elif yunohost_version_req.startswith("11.0"):
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."
)
Expand Down

0 comments on commit 9f21502

Please sign in to comment.