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

Add timed_out property for time_limited #490

Merged
merged 4 commits into from
Dec 18, 2020
Merged

Add timed_out property for time_limited #490

merged 4 commits into from
Dec 18, 2020

Conversation

bbayles
Copy link
Collaborator

@bbayles bbayles commented Dec 18, 2020

Re: #487, this PR adds a means of determining whether timed_out, well, timed out.

The test failures are due to actions/setup-python#171; I'll merge after that is fixed.

"""
Yield items from *iterable* until *limit_seconds* have passed.
If the iterable is not exhausted in the time limit, the ``timed_out``

Choose a reason for hiding this comment

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

I think:

If the time limit is reached before the iterable is exhausted, the ``timed_out`` attribute will be ``True``

would be clearer.

@bbayles bbayles linked an issue Dec 18, 2020 that may be closed by this pull request
@bbayles bbayles merged commit 9c8dabe into master Dec 18, 2020
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.

Provide a way for time_limited() to indicate why it ended
2 participants