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

Provide new_segment_callback with Segment, not list[Segment], fixing type hints #61

Merged
merged 3 commits into from
Sep 25, 2024
Merged

Conversation

issacdowling
Copy link
Contributor

In my editor, it's shown that new_segment_callback is to be provided a Segment, but it actually provides a list[Segment] with one element. I've changed this by just returning that first element so that it matches the type hints.

@issacdowling
Copy link
Contributor Author

If it's a larger issue that this would break existing callbacks using the list of Segments, the type hint could just be switched to match, but providing one Segment rather than one Segment in a list seems better

Copy link
Owner

@absadiki absadiki left a comment

Choose a reason for hiding this comment

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

Nice catch @issacdowling

@absadiki absadiki merged commit 3f0d207 into absadiki:main Sep 25, 2024
10 checks passed
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