-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
2b1ba99
to
fe252fc
Compare
CodSpeed Performance ReportMerging #16468 will not alter performanceComparing Summary
|
@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 | ||
|
||
|
There was a problem hiding this comment.
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.
8981f2a
to
a6fc0d4
Compare
A few more modules to pass strict typing checks.
a6fc0d4
to
3786aa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
A few more modules to pass strict typing checks.
References #16292