lint: fix issues

This commit is contained in:
missytake
2024-01-12 16:24:45 +01:00
parent 3db7933d8b
commit 90e7169eef
3 changed files with 16 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ def setup_account(data_dir: str, debug: bool) -> deltachat.Account:
configtracker = ac.configure()
try:
configtracker.wait_finish()
except ConfigureFailed as e:
except ConfigureFailed:
print(
"configuration setup failed for %s with password:\n%s"
% (ac.get_config("addr"), ac.get_config("mail_pw"))
@@ -88,10 +88,16 @@ class GreetBot:
print("Inviting", user)
contact = self.account.create_contact(user)
chat = contact.create_chat()
chat.send_text("Welcome to %s! Here you can try out Delta Chat." % (self.domain,))
chat.send_text("I prepared some webxdc apps for you, if you are interested:")
chat.send_text(
"Welcome to %s! Here you can try out Delta Chat." % (self.domain,)
)
chat.send_text(
"I prepared some webxdc apps for you, if you are interested:"
)
chat.send_file(pkg_resources.resource_filename(__name__, "editor.xdc"))
chat.send_file(pkg_resources.resource_filename(__name__, "tower-builder.xdc"))
chat.send_file(
pkg_resources.resource_filename(__name__, "tower-builder.xdc")
)
chat.send_text(
"You can send a message to xstore@testrun.org to discover more apps! "
"Some of these games you can also play with friends, directly in the chat."
@@ -101,7 +107,9 @@ class GreetBot:
def main():
args = configargparse.ArgumentParser()
args.add_argument("--db_path", help="location of the Delta Chat database")
args.add_argument("--passdb", default=PASSDB_PATH, help="location of the chatmail passdb")
args.add_argument(
"--passdb", default=PASSDB_PATH, help="location of the chatmail passdb"
)
args.add_argument("--show-ffi", action="store_true", help="print Delta Chat log")
ops = args.parse_args()

View File

@@ -257,7 +257,9 @@ def _configure_postfix(config: Config, debug: bool = False) -> bool:
need_restart |= master_config.changed
header_cleanup = files.put(
src=importlib.resources.files(__package__).joinpath("postfix/submission_header_cleanup"),
src=importlib.resources.files(__package__).joinpath(
"postfix/submission_header_cleanup"
),
dest="/etc/postfix/submission_header_cleanup",
user="root",
group="root",

View File

@@ -4,7 +4,6 @@ import requests
import importlib
import subprocess
import datetime
from ipaddress import ip_address
class DNS: