Add info about osbsolete/superflous ask strings

This commit is contained in:
Alexandre Aubin 2021-03-15 02:26:41 +01:00
parent 0b1aa10e44
commit 975e2de5fc

View file

@ -1089,6 +1089,17 @@ class Manifest(TestSuite):
"No need to specify the choices list yourself." % argument["name"] "No need to specify the choices list yourself." % argument["name"]
) )
@test()
def obsolete_ask_strings(self):
ask_string_managed_by_the_core = [("domain", "domain"), ("path", "path"), ("admin", "user"), ("is_public", "boolean"), ("password", "password")]
for argument in self.manifest["arguments"].get("install", []):
if argument.get("ask") and (argument.get("name"), argument.get("type")) in ask_string_managed_by_the_core:
yield Info("Ask string for argument %s is superflous / will be ignored. Since 4.1, the core handles the ask string for some reccuring arg name/type for consistency and easier i18n. See https://github.com/YunoHost/example_ynh/pull/142" % argument.get("name"))
@test() @test()
def is_public_help(self): def is_public_help(self):
for argument in self.manifest["arguments"].get("install", []): for argument in self.manifest["arguments"].get("install", []):