Skip to content

[MLI] Utilize new typing features in dragon utils  #763

@MattToast

Description

@MattToast

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: CI/CDIssues related to continuous integration and deploymentarea: apiIssues related to API changestype: choreIssue outside of general development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions