Avoid mutable objects in signature

(cherry picked from commit 31ebf9356a)
This commit is contained in:
Gouvernathor 2024-03-30 17:18:54 +01:00 committed by LoafyLemon
parent 62cb39cd19
commit 1bd428a0d8

View File

@ -120,8 +120,9 @@ init -1 python:
_queue = None
_parent = None
def __init__(self, id, wait=0, priority=5, daytime=None, req=None, label=None, func=None, queue="eventqueue", autoenqueue=False, autodequeue=True,
repeat=True, fail_suffixes=("_fail", "too_much", "too_much_public"), ignore_labels=[], subevents=[], disabled=False):
def __init__(self, id,
wait=0, priority=5, daytime=None, req=None, label=None, func=None, queue="eventqueue", autoenqueue=False, autodequeue=True,
repeat=True, fail_suffixes=("_fail", "too_much", "too_much_public"), ignore_labels=(), subevents=(), disabled=False):
self.id = id
self.wait = wait
self.priority = priority
@ -134,8 +135,8 @@ init -1 python:
self.autodequeue = autodequeue
self.repeat = repeat
self.fail_suffixes = tuple(fail_suffixes)
self.ignore_labels = ignore_labels
self.subevents = subevents
self.ignore_labels = list(ignore_labels)
self.subevents = list(subevents)
self.disabled = disabled
for ev in subevents: