diff --git a/mylib/scripts/helpers.py b/mylib/scripts/helpers.py index 0fa78d6..3373a80 100644 --- a/mylib/scripts/helpers.py +++ b/mylib/scripts/helpers.py @@ -39,7 +39,7 @@ def get_default_opt_value(config, default_config, key): def get_opts_parser(desc=None, just_try=False, just_one=False, progress=False, config=None): """Retrieve options parser""" - default_config = dict(logfile=None) + default_config = {"logfile": None} parser = argparse.ArgumentParser(description=desc) @@ -91,20 +91,20 @@ def add_email_opts(parser, config=None, **defaults): """Add email options""" email_opts = parser.add_argument_group("Email options") - default_config = dict( - smtp_host="127.0.0.1", - smtp_port=25, - smtp_ssl=False, - smtp_tls=False, - smtp_user=None, - smtp_password=None, - smtp_debug=False, - email_encoding=sys.getdefaultencoding(), - sender_name=getpass.getuser(), - sender_email=f"{getpass.getuser()}@{socket.gethostname()}", - catch_all=False, - templates_path=None, - ) + default_config = { + "smtp_host": "127.0.0.1", + "smtp_port": 25, + "smtp_ssl": False, + "smtp_tls": False, + "smtp_user": None, + "smtp_password": None, + "smtp_debug": False, + "email_encoding": sys.getdefaultencoding(), + "sender_name": getpass.getuser(), + "sender_email": f"{getpass.getuser()}@{socket.gethostname()}", + "catch_all": False, + "templates_path": None, + } default_config.update(defaults) email_opts.add_argument(