forked from blizzthewolf/SeaCogs
fix(aurora): fixed a dangerous-default-value pylint warning in database.mysql_log()
This commit is contained in:
parent
84543fbd73
commit
95a947b019
1 changed files with 7 additions and 6 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue