whiTeLeaf-TL / U1bot

一个令人欢喜的娱乐机器
GNU General Public License v3.0
6 stars 3 forks source link

refactor: fix dangerous default argument #22

Closed deepsource-autofix[bot] closed 9 months ago

deepsource-autofix[bot] commented 9 months ago

Do not use a mutable like list or dictionary as a default value to an argument. Python’s default arguments are evaluated once when the function is defined. Using a mutable default argument and mutating it will mutate that object for all future calls to the function as well.