Repository navigation
[REF] Remove #type: ignore from SLM class #199
Description
Activity
- addedlow priorityLow priority issuesLow priority issuesPythonOn the Python implementationOn the Python implementationon holdIssues that rely on fixes to external softwareIssues that rely on fixes to external software
on Jul 29, 2021 mypy is temporary removed now, will mark this issue as add mypy back
- removedlow priorityLow priority issuesLow priority issueson holdIssues that rely on fixes to external softwareIssues that rely on fixes to external software
on Sep 27, 2024 Quick status check: the upstream mypy issue (python/mypy#10521) is still open. Several near-duplicates have been folded into it but no fix has landed — the in-class
from ._linear_model import _linear_modelstyle still trips mypy on current releases.Concretely, removing line 1 of
SLM.pyand runningmypy brainstat/against mypy 1.x reproduces a crash on the inner imports, so this issue is still blocked on the upstream resolution.- addedon holdIssues that rely on fixes to external softwareIssues that rely on fixes to external software
on May 4, 2026 Resolved in #381. Mypy was crashing because of the in-class
from ._linear_model import _linear_modelpattern (python/mypy#10521). Lifting those imports to module level and binding them as class attributes (_linear_model = _linear_model) gets mypy past the crash, so the file-level# type: ignoreshebangs are gone from bothSLM.pyand_multiple_comparisons.py. The ~380 pre-existing untyped-code errors that were hiding behind the blanket ignore now surface — those are a separate cleanup task; until they're triaged we're leaving the commented-outmypyCI job alone.- added a commit that references this issue
on May 4, 2026
Currently, mypy crashes on SLM.py due to an import inside a class. This issue is tracked at mypy/issuse/10521.
Once mypy resolves it issue, this issue can be solved by simply removing the following: https://github.com/MICA-MNI/BrainStat/blob/master/brainstat/stats/SLM.py#L1