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: fix type hint of Timeline.to_annotation #98

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lukasstorck
Copy link

If generator is set to None, the function would raise an Exception in line 1067 when next(generator) is call on None. So I guess generator should never be None.

At first I only wanted to correct the duplicate None in the type hint, so I would update the type hint, if None is handled in any other way.

@lukasstorck
Copy link
Author

I guess what happened was, when the type hints were first added in the new line 921, it was first though of as a Generator with Generator[Label, None, None], which can also be expressed as Iterator[Label] (see typing.Generator).

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.

1 participant