IsSensor type hints allow multidimensional channels#82
Merged
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…-python into ddkohler-patch-1
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…-python into ddkohler-patch-1
Contributor
Author
|
Not sure why pytest freezes from 3.12, ubuntu-latest; will look into when I get the chance. |
for more information, see https://pre-commit.ci
curious if the freze issue still persists
for more information, see https://pre-commit.ci
ksunden
approved these changes
Oct 28, 2025
Member
ksunden
left a comment
There was a problem hiding this comment.
I agree with the primary change here, I'd tend to prefer that python version stuff be changed independently if possible (just cleaner that way)
Nothing to worry about undoing, just a preference.
That said, 3.14 is out, so may be time to go through a lot of repos and update the python version systematically. (unrelated to this change though)
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.
I think the original typing for
channel_shapedid not account for the possibility of multidimensional channels. This PR lets thetuplefor shape be any length ofints.Changes
tuple[int]->tuple[int, ...]MeasureType--I don't believe the current definition was accurate (it assumed all dict items were floats), and it is cumbersome to keep type alias definitions succinct, while adopting current type hint practices, across all supported python versions (python>=3.8).TODO
from __future__ import annotations)