fix(aurora): fixed a dangerous-default-value pylint warning in database.mysql_log()

This commit is contained in:
Seaswimmer 2024-02-28 11:01:33 -05:00
parent 84543fbd73
commit 95a947b019
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -8,7 +8,8 @@ from discord import Guild
from redbot.core import data_manager
from .logger import logger
from .utils import convert_timedelta_to_str, generate_dict, get_next_case_number
from .utils import (convert_timedelta_to_str, generate_dict,
get_next_case_number)
def connect() -> sqlite3.Connection:
@ -118,9 +119,9 @@ async def mysql_log(
resolved_by: str = None,
resolved_reason: str = None,
expired: bool = None,
changes: list = [],
metadata: dict = {},
) -> int: # pylint: disable=dangerous-default-value
changes: list = None,
metadata: dict = None,
) -> int:
if not timestamp:
timestamp = int(time.time())
@ -169,8 +170,8 @@ async def mysql_log(
resolved_by,
resolved_reason,
expired,
json.dumps(changes),
json.dumps(metadata),
json.dumps(changes if changes else []),
json.dumps(metadata if metadata else {}),
)
cursor.execute(sql, val)