Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks
MattToast opened this issue Oct 24, 2024 · 0 comments
Open
3 tasks

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

MattToast opened this issue Oct 24, 2024 · 0 comments
Labels
area: api Issues related to API changes area: CI/CD Issues related to continuous integration and deployment type: chore Issue outside of general development

Comments

@MattToast
Copy link
Member

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
@MattToast MattToast added area: api Issues related to API changes area: CI/CD Issues related to continuous integration and deployment type: chore Issue outside of general development labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API changes area: CI/CD Issues related to continuous integration and deployment type: chore Issue outside of general development
Projects
None yet
Development

No branches or pull requests

1 participant