diff --git a/src/blueapi/core/bluesky_types.py b/src/blueapi/core/bluesky_types.py index ce5fd66d3..1a2978213 100644 --- a/src/blueapi/core/bluesky_types.py +++ b/src/blueapi/core/bluesky_types.py @@ -75,7 +75,7 @@ def _follows_bluesky_protocols(obj: Any) -> bool: def is_bluesky_plan_generator(func: PlanGenerator) -> bool: try: - return get_type_hints(func).get("return") is MsgGenerator + return get_type_hints(func).get("return") == MsgGenerator except TypeError: # get_type_hints fails on some objects (such as Union or Optional) return False