diff --git a/src/dls_bluesky_core/core/coordination.py b/src/dls_bluesky_core/core/coordination.py index 1a94742..694c451 100644 --- a/src/dls_bluesky_core/core/coordination.py +++ b/src/dls_bluesky_core/core/coordination.py @@ -12,3 +12,21 @@ def group_uuid(name: str) -> str: readable_uid (str): name appended with a unique string """ return f"{name}-{str(uuid.uuid4())[:6]}" + + +def inject(name: str): + """ + Function to mark a default argument of a plan method as a reference to a device + that is stored in the Blueapi context. + Bypasses mypy linting, returning x as Any and therefore valid as a default + argument. + + Args: + name (str): Name of a device to be fetched from the Blueapi context + + Returns: + Any: name but without typing checking, valid as any default type + + """ + + return name