Now using black for formatting

This commit is contained in:
2023-03-09 11:33:02 +01:00
parent 4331af415e
commit 88692ebc85
19 changed files with 701 additions and 250 deletions

View File

@@ -8,18 +8,16 @@ with open("config.json", "r", encoding="utf-8") as f:
f.close()
if db_config["user"] is not None and db_config["password"] is not None:
con_string = 'mongodb://{0}:{1}@{2}:{3}/{4}'.format(
con_string = "mongodb://{0}:{1}@{2}:{3}/{4}".format(
db_config["user"],
db_config["password"],
db_config["host"],
db_config["port"],
db_config["name"]
db_config["name"],
)
else:
con_string = 'mongodb://{0}:{1}/{2}'.format(
db_config["host"],
db_config["port"],
db_config["name"]
con_string = "mongodb://{0}:{1}/{2}".format(
db_config["host"], db_config["port"], db_config["name"]
)
db_client = MongoClient(con_string)
@@ -34,4 +32,4 @@ for collection in ["sent", "users", "banned", "submitted"]:
col_sent = db.get_collection("sent")
col_users = db.get_collection("users")
col_banned = db.get_collection("banned")
col_submitted = db.get_collection("submitted")
col_submitted = db.get_collection("submitted")