Removed 3.7 incompatible type hints, added KeyboardInterrupt detection for exit code 0

This commit is contained in:
Frisk 2022-06-16 23:06:25 +02:00
parent e935fe846c
commit b58bc25043
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC
2 changed files with 6 additions and 2 deletions

View file

@ -50,7 +50,7 @@ def delete_messages(matching_data: dict):
db_connection.commit()
def redact_messages(ids: Union[List[Union[str, int]], set[Union[int, str]]], entry_type: int, to_censor: dict):
def redact_messages(ids, entry_type: int, to_censor: dict): # : Union[List[Union[str, int]], set[Union[int, str]]]
"""Redact past Discord messages
ids: list of ints

View file

@ -344,4 +344,8 @@ if TESTING:
while 1:
time.sleep(1.0)
try:
client.scheduler.run()
except KeyboardInterrupt:
logger.info("Shutting down...")
break