Rework and harmonize the channel selection 'pick' API and expose public functions #12341
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.
To start the ball rolling on #11913
I think that would represent the main structure of the proposal. The type-hints are present to detail the structure, they can be retained in the final version or removed (note: the type-hint for slice is likely incorrect as it's not generic and thus we can not specify the type-hints of
start
,stop
andstep
which should all be integers for those functions).To minimize the difference, I've added the new proposed structure to a private
mne._fiff._pick.py
file. I propose to reverse the orderpick.py <-> _pick.py
to keep all the public non-legacy functions in a file without underscore (which includes some functions from the currentmne._fiff.pick.py
file).I'm still not entirely convince this is the best structure, thus any feedback is welcome :)