From 815fd334da0197bb2cdf2734026e9d5121447bd4 Mon Sep 17 00:00:00 2001 From: Andy Leap <104936100+andrewleap-optimizely@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:20:51 -0500 Subject: [PATCH 1/3] fix type hints --- optimizely/event/event_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizely/event/event_processor.py b/optimizely/event/event_processor.py index 0341c1e47..9445ffc64 100644 --- a/optimizely/event/event_processor.py +++ b/optimizely/event/event_processor.py @@ -351,7 +351,7 @@ class ForwardingEventProcessor(BaseEventProcessor): def __init__( self, - event_dispatcher: type[EventDispatcher] | CustomEventDispatcher, + event_dispatcher: Optional[type[EventDispatcher] | CustomEventDispatcher], logger: Optional[_logging.Logger] = None, notification_center: Optional[_notification_center.NotificationCenter] = None ): From 940599883c8112c5cd0dad07a17e11a8d1bc49a6 Mon Sep 17 00:00:00 2001 From: Andy Leap <104936100+andrewleap-optimizely@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:24:54 -0500 Subject: [PATCH 2/3] fix lint error --- optimizely/optimizely_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizely/optimizely_config.py b/optimizely/optimizely_config.py index c4f55d862..37969fb47 100644 --- a/optimizely/optimizely_config.py +++ b/optimizely/optimizely_config.py @@ -243,7 +243,7 @@ def stringify_conditions(self, conditions: str | list[Any], audiences_map: dict[ operand = conditions[i].upper() else: # Check if element is a list or not - if type(conditions[i]) == list: + if isinstance(conditions[i], list): # Check if at the end or not to determine where to add the operand # Recursive call to call stringify on embedded list if i + 1 < length: From aff53b16c9547110a835d431ac4e573a5a241591 Mon Sep 17 00:00:00 2001 From: Andy Leap <104936100+andrewleap-optimizely@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:22:45 -0500 Subject: [PATCH 3/3] Create py.typed --- optimizely/py.typed | 1 + 1 file changed, 1 insertion(+) create mode 100644 optimizely/py.typed diff --git a/optimizely/py.typed b/optimizely/py.typed new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/optimizely/py.typed @@ -0,0 +1 @@ +