SmartSim
SmartSim copied to clipboard
[MLI] Utilize new typing features in dragon utils
Description
In smartsim._core.mli.infrastructure.control.dragon_util the function function_as_dragon_proc can benefit from leveraging newer typing features.
Justification
Nicer typing allows for better static analysis and better code correctness w/o needing to manually write tests.
Implementation Strategy
Update smartsim._core.mli.infrastructure.control.dragon_util to read
from tpying_extentsions import TypeVarTuple, Unpack
if t.TYPE_CHECKING:
_Ts = TypeVarTuple("_Ts")
def function_as_dragon_proc(
entrypoint_fn: t.Callable[[Unpack[_Ts]], None],
args: tuple[Unpack[_Ts]],
... # Additional args here
) -> dragon_process.Process:
...
Acceptance Criteria
- [ ] Function is properly typed
- [ ] Any type errors are resolved
- [ ] CI passes