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

[typing] misc prefect modules #16468

Merged
merged 1 commit into from
Dec 22, 2024
Merged

Conversation

mjpieters
Copy link
Contributor

@mjpieters mjpieters commented Dec 20, 2024

A few more modules to pass strict typing checks.

References #16292

@github-actions github-actions bot added the development Tech debt, refactors, CI, tests, and other related work. label Dec 20, 2024
Copy link

codspeed-hq bot commented Dec 20, 2024

CodSpeed Performance Report

Merging #16468 will not alter performance

Comparing mjpieters:typing_prefect_misc (3786aa5) with main (6f5d463)

Summary

✅ 3 untouched benchmarks

Comment on lines -233 to -265
@inject_client
async def _create_artifact(
type: str,
key: Optional[str] = None,
description: Optional[str] = None,
data: Optional[Union[Dict[str, Any], Any]] = None,
client: Optional["PrefectClient"] = None,
) -> UUID:
"""
Helper function to create an artifact.

Arguments:
type: A string identifying the type of artifact.
key: A user-provided string identifier.
The key must only contain lowercase letters, numbers, and dashes.
description: A user-specified description of the artifact.
data: A JSON payload that allows for a result to be retrieved.
client: The PrefectClient

Returns:
- The table artifact ID.
"""

artifact = await Artifact(
type=type,
key=key,
description=description,
data=data,
).create(client)

return artifact.id


Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method has been unused since the last reference to it was removed in 8577a34.

@mjpieters mjpieters force-pushed the typing_prefect_misc branch 18 times, most recently from 8981f2a to a6fc0d4 Compare December 21, 2024 20:46
A few more modules to pass strict typing checks.
@github-actions github-actions bot added the upstream dependency An upstream issue caused by a bug in one of our dependencies label Dec 21, 2024
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

LGTM!

@desertaxle desertaxle merged commit 46c6164 into PrefectHQ:main Dec 22, 2024
44 checks passed
@mjpieters mjpieters deleted the typing_prefect_misc branch December 22, 2024 09:13
devinvillarosa pushed a commit that referenced this pull request Dec 24, 2024
devinvillarosa pushed a commit that referenced this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work. upstream dependency An upstream issue caused by a bug in one of our dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants