-
Notifications
You must be signed in to change notification settings - Fork 295
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
base: main
Are you sure you want to change the base?
fix: typing in core #504
Conversation
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], |
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.
Shouldn't the callable here be Callable[(str,) bool]
? It's used as if predicate(stdout) or predicate(stderr):
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.
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)
No description provided.