Skip to content

Commit 8e12cb6

Browse files
authored
Make inject argument optional (#1649)
1 parent ba7f9ce commit 8e12cb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dodal/common/coordination.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def group_uuid(name: str) -> Group:
1717
return f"{name}-{str(uuid.uuid4())[:6]}"
1818

1919

20-
def inject(name: str) -> Any: # type: ignore
20+
def inject(name: str = "") -> Any: # type: ignore
2121
"""
2222
Function to mark a defaulted argument of a plan as a reference to a device stored
2323
in another context and not available to be referenced directly.
@@ -30,7 +30,8 @@ def inject(name: str) -> Any: # type: ignore
3030
def scan(x: Movable = inject("stage_x"), start: float = 0.0 ...)
3131
3232
Args:
33-
name (str): Name of a Device to be fetched from an external context
33+
name (str): Name of a Device to be fetched from an external context. This can be
34+
left blank when injecting device composites (the default)
3435
3536
Returns:
3637
Any: name but without typing checking, valid as any default type

0 commit comments

Comments
 (0)