🎨 Format Python code with Black

This commit is contained in:
alexAubin 2021-08-27 20:14:09 +00:00 committed by GitHub
parent 55774ef8fc
commit fe84eba4ab
3 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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)