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

Tidy DataFuture argument types #3742

Merged
merged 2 commits into from
Jan 13, 2025
Merged

Tidy DataFuture argument types #3742

merged 2 commits into from
Jan 13, 2025

Conversation

benclifford
Copy link
Collaborator

The task ID is never optional: a DataFuture always comes from a Parsl task. (in the same way that an AppFuture always has a task record)

Long ago, Files could be specified as strings. This behaviour was removed slightly less long ago. Right now, typeguard should be detecting if a string is passed, because of the type signature, and so the explicit type check for strings should be unnecessary. This PR removes that explicit type check.

The future being tracked by the data future is not necessarily an AppFuture: it can be any kind of future that completes to indicate the represented file is now available. That is already reflected in the type annotations and code, but this PR fixes the docstring.

Changed Behaviour

none

Type of change

  • Code maintenance/cleanup

The task ID is never optional: a DataFuture always comes from a
Parsl task. (in the same way that an AppFuture always has a
task record)

Long ago, Files could be specified as strings. This behaviour
was removed slightly less long ago. Right now, typeguard should
be detecting if a string is passed, because of the type signature,
and so the explicit type check for strings should be unnecessary.
This PR removes that explicit type check.

The future being tracked by the data future is not necessarily an
AppFuture: it can be any kind of future that completes to indicate
the represented file is now available. That is already reflected
in the type annotations and code, but this PR fixes the docstring.
Copy link
Collaborator

@khk-globus khk-globus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very-often forget about typeguard. Useful functionality.

@khk-globus khk-globus added this pull request to the merge queue Jan 13, 2025
Merged via the queue into master with commit c3091a0 Jan 13, 2025
8 checks passed
@khk-globus khk-globus deleted the benc-datafuture-typing branch January 13, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants