Skip to content

Commit

Permalink
Format Python code with psf/black push
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions committed Mar 3, 2023
1 parent f999a7d commit 3bf6637
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion cogs/moderations_service_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
MOD_DB = None
try:
print("Attempting to retrieve the General and Moderations DB")
MOD_DB = SqliteDict(EnvService.find_shared_file("main_db.sqlite"), tablename="moderations", autocommit=True)
MOD_DB = SqliteDict(
EnvService.find_shared_file("main_db.sqlite"),
tablename="moderations",
autocommit=True,
)
except Exception as e:
print("Failed to retrieve the General and Moderations DB")
raise e
Expand Down
12 changes: 10 additions & 2 deletions cogs/text_service_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@
GENERAL_DB = None
try:
print("Attempting to retrieve the General and Moderations DB")
MOD_DB = SqliteDict(EnvService.find_shared_file("main_db.sqlite"), tablename="moderations", autocommit=True)
GENERAL_DB = SqliteDict(EnvService.find_shared_file("main_db.sqlite"), tablename="general", autocommit=True)
MOD_DB = SqliteDict(
EnvService.find_shared_file("main_db.sqlite"),
tablename="moderations",
autocommit=True,
)
GENERAL_DB = SqliteDict(
EnvService.find_shared_file("main_db.sqlite"),
tablename="general",
autocommit=True,
)
print("Retrieved the General and Moderations DB")
except Exception as e:
print("Failed to retrieve the General and Moderations DB. The bot is terminating.")
Expand Down
4 changes: 2 additions & 2 deletions models/index_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ async def compose_indexes(self, user_id, indexes, name, deep_compose):
)

# Save the composed index
tree_index.save_to_disk(app_root_path()/"indexes"/user_id/name)
tree_index.save_to_disk(app_root_path() / "indexes" / user_id / name)

self.index_storage[user_id].queryable_index = tree_index

Expand Down Expand Up @@ -822,7 +822,7 @@ async def compose_indexes(self, user_id, indexes, name, deep_compose):
name = f"composed_index_{date.today().month}_{date.today().day}.json"

# Save the composed index
simple_index.save_to_disk(app_root_path()/"indexes"/user_id/name)
simple_index.save_to_disk(app_root_path() / "indexes" / user_id / name)
self.index_storage[user_id].queryable_index = simple_index

try:
Expand Down

0 comments on commit 3bf6637

Please sign in to comment.