mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Merge pull request #158 from YunoHost/actions/black
Format Python code with Black
This commit is contained in:
commit
9f215023c4
1 changed files with 12 additions and 9 deletions
|
@ -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."
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue