Skip to content

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).

@hbredin
Copy link
Member

hbredin commented Jan 12, 2025

Closing in favor of #96

@hbredin hbredin closed this Jan 12, 2025
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.

2 participants