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

fix: typing in core #504

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

fix: typing in core #504

wants to merge 3 commits into from

Conversation

alexanderankin
Copy link
Collaborator

No description provided.

@alexanderankin alexanderankin changed the title typing in core fix: typing in core Mar 25, 2024
@totallyzen
Copy link
Collaborator

Nice! Glad you found the time before me! Good start! 🙏

@@ -78,7 +78,10 @@ def wait_for(condition: Callable[..., bool]) -> bool:


def wait_for_logs(
container: "DockerContainer", predicate: Union[Callable, str], timeout: Optional[float] = None, interval: float = 1
container: "DockerContainer",
predicate: Union[Callable[..., Any], str],
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the callable here be Callable[(str,) bool]? It's used as if predicate(stdout) or predicate(stderr):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in java it also takes regex i dont remember if that is the case here but i will leave this thread open to review when and if this PR goes on. I think it belongs in a draft state for now. i just wanted to record the results of going through the exercise to add types. for example, some of the places we return ports are actually str | int (well, union, for 3.8 compatibility)

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.

None yet

3 participants