mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
correct lint bugs
This commit is contained in:
parent
b22c724fac
commit
5bbd9cece2
1 changed files with 4 additions and 6 deletions
|
@ -269,7 +269,7 @@ def make_argument_list(action_map: dict, spaces: str = 4 * " ") -> str:
|
||||||
if argument_name[0] != "-":
|
if argument_name[0] != "-":
|
||||||
position += 1
|
position += 1
|
||||||
# This parameter may be used more than once, else we use the position counter
|
# This parameter may be used more than once, else we use the position counter
|
||||||
if argument_details.get("nargs", "") in "+*":
|
if argument_details.get("nargs", "") in ["+", "*"]:
|
||||||
if argument_details["nargs"] == "+":
|
if argument_details["nargs"] == "+":
|
||||||
arg["spec"] = "'{{{},*}}'".format(str(position))
|
arg["spec"] = "'{{{},*}}'".format(str(position))
|
||||||
else: # argument_details["nargs"] == "*":
|
else: # argument_details["nargs"] == "*":
|
||||||
|
@ -312,7 +312,7 @@ def make_argument_list(action_map: dict, spaces: str = 4 * " ") -> str:
|
||||||
|
|
||||||
has_action = True
|
has_action = True
|
||||||
# Add a pattern field to match multiple arguments
|
# Add a pattern field to match multiple arguments
|
||||||
if argument_details.get("nargs", "") in "+*":
|
if argument_details.get("nargs", "") in ["+", "*"]:
|
||||||
if arg["excludes"]:
|
if arg["excludes"]:
|
||||||
# suppose that `arg["excludes"] = (-f --foo)`
|
# suppose that `arg["excludes"] = (-f --foo)`
|
||||||
arg["excludes"] = "(* " + arg["excludes"][1:]
|
arg["excludes"] = "(* " + arg["excludes"][1:]
|
||||||
|
@ -666,11 +666,9 @@ function _yunohost_COMMAND() {
|
||||||
YNH_SUBCATEGORY
|
YNH_SUBCATEGORY
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
''',
|
""",
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
'subcategory':
|
"subcategory": r"""
|
||||||
r'''
|
|
||||||
local -a yunohost_COMMAND_subcategories; yunohost_COMMAND_subcategories=(
|
local -a yunohost_COMMAND_subcategories; yunohost_COMMAND_subcategories=(
|
||||||
YNH_SUBCACTEGORIES_DESCRIPTION
|
YNH_SUBCACTEGORIES_DESCRIPTION
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue