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 redbot.core import data_manager
|
||||||
|
|
||||||
from .logger import logger
|
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:
|
def connect() -> sqlite3.Connection:
|
||||||
|
@ -118,9 +119,9 @@ async def mysql_log(
|
||||||
resolved_by: str = None,
|
resolved_by: str = None,
|
||||||
resolved_reason: str = None,
|
resolved_reason: str = None,
|
||||||
expired: bool = None,
|
expired: bool = None,
|
||||||
changes: list = [],
|
changes: list = None,
|
||||||
metadata: dict = {},
|
metadata: dict = None,
|
||||||
) -> int: # pylint: disable=dangerous-default-value
|
) -> int:
|
||||||
if not timestamp:
|
if not timestamp:
|
||||||
timestamp = int(time.time())
|
timestamp = int(time.time())
|
||||||
|
|
||||||
|
@ -169,8 +170,8 @@ async def mysql_log(
|
||||||
resolved_by,
|
resolved_by,
|
||||||
resolved_reason,
|
resolved_reason,
|
||||||
expired,
|
expired,
|
||||||
json.dumps(changes),
|
json.dumps(changes if changes else []),
|
||||||
json.dumps(metadata),
|
json.dumps(metadata if metadata else {}),
|
||||||
)
|
)
|
||||||
cursor.execute(sql, val)
|
cursor.execute(sql, val)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue