chore(typing): Widen _utils signatures#2712
Merged
MarcoGorelli merged 7 commits intomainfrom Jun 25, 2025
Merged
Conversation
In light of (#2706 (comment)) Splitting out a change from https://github.com/narwhals-dev/narwhals/blob/7bb0d0df3d2f75bc903aa9fc2abf0ecc5a61f432/narwhals/_utils.py#L1194 With that, I noticed a few others that also didn't need all the features of `Sequence`
The type here is dependent on `check_columns_exist` See #2495 (comment)
`list[str] | _1DArray` is assignable to `Collection[str]` Previously, failed on `Sequence[str]` due to `numpy`
This comment was marked as resolved.
This comment was marked as resolved.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What type of PR is this? (check all applicable)
Related issues
test_sumh_transformationsfailure for cudf #2706 (comment))narwhals/narwhals/_utils.py
Line 1194 in 7bb0d0d
Checklist
If you have comments or can explain your changes, please do so below
With that, I noticed a few others that also didn't need all the features of
Sequence.For reference, this section of the stubs is probably handy when trying to decide which
Protocolto usehttps://github.com/python/typeshed/blob/b98b6c376bb8d1443108c42c766e3de199328d32/stdlib/typing.pyi#L619-L643