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

Support env states with custom status functions #743

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

mskarlin
Copy link
Collaborator

@mskarlin mskarlin commented Dec 4, 2024

Users may need custom status messages upon extra tools -- this allows custom status functions to be build into the EnvironmentState.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Dec 4, 2024
@@ -31,13 +32,38 @@ def make_status(
)


def default_status(state: "EnvironmentState") -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll need a TYPE_CHECKING block that imports EnvironmentState I think for this to work

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

EnvironmentState is in this file, so I think we're good here

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep i was wrong here, sorry for false positive comment

@@ -31,13 +32,38 @@ def make_status(
)


def default_status(state: "EnvironmentState") -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep i was wrong here, sorry for false positive comment

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 4, 2024
@mskarlin mskarlin merged commit 6102343 into main Dec 4, 2024
5 checks passed
@mskarlin mskarlin deleted the custom-status-fn branch December 4, 2024 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants