From 5a4c1bd6a256d5cae1331464bfa86438c1e4d155 Mon Sep 17 00:00:00 2001 From: knowhere01 <113712042+knowhere01@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:35:01 +0700 Subject: [PATCH 1/2] fix(Events): Dereference subscription store from ephemeral store --- devine/core/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devine/core/events.py b/devine/core/events.py index b1ce983..91b81d5 100644 --- a/devine/core/events.py +++ b/devine/core/events.py @@ -1,5 +1,6 @@ from __future__ import annotations +from copy import deepcopy from enum import Enum from typing import Any, Callable @@ -25,10 +26,11 @@ class Events: def reset(self): """Reset Event Observer clearing all Subscriptions.""" - self.__subscriptions = self.__ephemeral = { + self.__subscriptions = { k: [] for k in Events.Types.__members__.values() } + self.__ephemeral = deepcopy(self.__subscriptions) def subscribe(self, event_type: Events.Types, callback: Callable, ephemeral: bool = False) -> None: """ From e92f8ed067280010cda03ca4a018463ebb294870 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Fri, 5 Apr 2024 12:24:25 +0100 Subject: [PATCH 2/2] docs(contributors): Add knowhere01 to Contributor list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 953c826..b8de88d 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,7 @@ Please refrain from spam or asking for questions that infringe upon a Service's varyg1001 Hollander-1908 Shivelight +knowhere01 ## Licensing