Skip to content

Type improvement#13671

Draft
1himan wants to merge 7 commits intomne-tools:mainfrom
1himan:fix#13597
Draft

Type improvement#13671
1himan wants to merge 7 commits intomne-tools:mainfrom
1himan:fix#13597

Conversation

@1himan
Copy link
Contributor

@1himan 1himan commented Feb 20, 2026

Reference issue - Fixes #13597.

Fixes the type error:
image

which previously would've looked like:
image

@1himan
Copy link
Contributor Author

1himan commented Feb 21, 2026

Okay I only see this now. There's already a typing utility in the repo. Would it be better if we add more elaborated types there? and import the type hints from there or mne.typing as suggested by @larsoner ?

Just say so and I'll start working it 😉.

@larsoner
Copy link
Member

There was at one point a lot of discussion of types and I don't offhand remember the outcomes. See for example #8218 (comment)

@1himan
Copy link
Contributor Author

1himan commented Feb 25, 2026

hey @scott-huberty for simplicity(only for right now), I've done this:
verbose: bool | str | int | None = None,

I see that you gave the notion about creatin a new typing module here - but there already exists one but there's nothing defined in there :)
What are your thoughts on this?

@1himan 1himan marked this pull request as draft February 28, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type hints for mne.preprocessing.ICA() are narrower than their runtime behavior and documented usage.

2 participants