From 2b64fa1ee23f8ce5f3a14d9f70e80547611e126d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 02:11:07 +0000 Subject: [PATCH] Fix dangerous default argument --- minato_namikaze/bot_files/cogs/fun/encoding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/minato_namikaze/bot_files/cogs/fun/encoding.py b/minato_namikaze/bot_files/cogs/fun/encoding.py index 8da8133c..3d2bcdb6 100644 --- a/minato_namikaze/bot_files/cogs/fun/encoding.py +++ b/minato_namikaze/bot_files/cogs/fun/encoding.py @@ -23,13 +23,15 @@ def pagify( text: str, - delims: Sequence[str] = ["\n"], + delims: Sequence[str] = None, *, priority: bool = False, escape_mass_mentions: bool = True, shorten_by: int = 8, page_length: int = 2000, ) -> Iterator[str]: + if delims is None: + delims = ["\n"] in_text = text page_length -= shorten_by while len(in_text) > page_length: