Fix some pylint warnings
This commit is contained in:
parent
e8572e2eaa
commit
f8602801d7
1 changed files with 15 additions and 15 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue