mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
🎨 Format Python code with Black
This commit is contained in:
parent
55774ef8fc
commit
fe84eba4ab
3 changed files with 4 additions and 0 deletions
|
@ -379,6 +379,7 @@ class ExtraArgumentParser(object):
|
||||||
|
|
||||||
# Main class ----------------------------------------------------------
|
# Main class ----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class ActionsMap(object):
|
class ActionsMap(object):
|
||||||
|
|
||||||
"""Validate and process actions defined into an actions map
|
"""Validate and process actions defined into an actions map
|
||||||
|
|
|
@ -24,6 +24,7 @@ for key in env.keys():
|
||||||
|
|
||||||
env["NAMESPACES"] = env["NAMESPACES"].split()
|
env["NAMESPACES"] = env["NAMESPACES"].split()
|
||||||
|
|
||||||
|
|
||||||
def during_unittests_run():
|
def during_unittests_run():
|
||||||
return "TESTS_RUN" in os.environ
|
return "TESTS_RUN" in os.environ
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ from moulinette.utils import log
|
||||||
# But it display instead:
|
# But it display instead:
|
||||||
# Error: unable to parse arguments 'firewall' because: sequence item 0: expected str instance, NoneType found
|
# Error: unable to parse arguments 'firewall' because: sequence item 0: expected str instance, NoneType found
|
||||||
|
|
||||||
|
|
||||||
def monkey_get_action_name(argument):
|
def monkey_get_action_name(argument):
|
||||||
if argument is None:
|
if argument is None:
|
||||||
return None
|
return None
|
||||||
|
@ -502,6 +503,7 @@ class Interface:
|
||||||
if output_as:
|
if output_as:
|
||||||
if output_as == "json":
|
if output_as == "json":
|
||||||
import json
|
import json
|
||||||
|
|
||||||
print(json.dumps(ret, cls=JSONExtendedEncoder))
|
print(json.dumps(ret, cls=JSONExtendedEncoder))
|
||||||
else:
|
else:
|
||||||
plain_print_dict(ret)
|
plain_print_dict(ret)
|
||||||
|
|
Loading…
Reference in a new issue