Avoid mutable objects in signature

This commit is contained in:
Gouvernathor 2024-03-30 17:18:54 +01:00
parent f7f0ecb566
commit 31ebf9356a

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: