Skip to content

ENH add types for dataset classes (BrainData, Dataview, ...) - #669

Draft
kroq-gar78 wants to merge 9 commits into
types/01-03-04-infra-geometry-databasefrom
types/05-dataset-core
Draft

ENH add types for dataset classes (BrainData, Dataview, ...)#669
kroq-gar78 wants to merge 9 commits into
types/01-03-04-infra-geometry-databasefrom
types/05-dataset-core

Conversation

@kroq-gar78

@kroq-gar78 kroq-gar78 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR adds partial type support for the dataset classes. A rework of the dataset class hierarchy is likely necessary for full type support, but this PR should still be useful for end users.

This makes no behavior changes besides adding some type guards (which would have triggered runtime errors anyway).


Stack created with GitHub Stacks CLIGive Feedback 💬

The mapper/mapper.py and webgl/data.py/webgl/view.py hunks of this
original commit are owned by PR 6 and PR 9 respectively.
Consolidates the rest of PR 5's per-commit typing work (dataset/braindata.py,
dataset/views.py, dataset/view2D.py, dataset/viewRGB.py, dataset/__init__.py,
tests/test_dataset.py) into one commit rather than replaying the remaining
~15 original commits individually.

Reason for the shortcut: several of these commits touch the same lines in a
different real chronological order than PR_SPLIT_PLAN.md's "PR-internal
commit order is chronological" claim assumes (e.g. `1d2164b5`, dated
2026-03-07 17:54, resolves ColormapDict's `cmap` TODO before `90acd0bd`,
dated 2026-03-07 21:29, removes the now-unused ListedColormap import — but
the plan lists 90acd0b at position 9 and 1d2164b at position 21). Replaying
in the plan's listed order applies real hunks against a file shape they
weren't authored against, which is how a silent bug (re-deleting an import
still in use) almost landed in the first cherry-pick pass. This commit
instead checks out the exact final state of each PR-5-owned file from
`types-easy`, verified to produce zero diff against `types-easy` for every
file in PR 5's file list.
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.

1 participant