Skip to content

Add type checking#31

Merged
Lucia-Poma merged 1 commit into
Brain-Modulation-Lab:mainfrom
richardkoehler:feat/add-typing
Apr 15, 2026
Merged

Add type checking#31
Lucia-Poma merged 1 commit into
Brain-Modulation-Lab:mainfrom
richardkoehler:feat/add-typing

Conversation

@richardkoehler

@richardkoehler richardkoehler commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator
  • Added typing tooling/deps in pyproject.toml

  • Added pandas-stubs to dev dependencies.

  • Kept ty in dev dependencies.

  • Added global ty rule config: unresolved-attribute = "ignore"

  • Added/updated type hints and type-safety fixes across source files:

  • Integrated pre-commit typing

  • Updated .pre-commit-config.yaml with a local hook

  • Integrated CI typing as a second job in same workflow

    • added new type-check job
  • Bugs discovered and fixed

  • Real syntax bug: multiple files used legacy Python 2 exception syntax (except A, B:), which is invalid in Python 3. Fixed to except (A, B): in affected files (controllers/views/utils/ui).

  • Potential runtime typing issues fixed:

    • Safer handling of optional file paths before open()/unlink().
    • DataFrame indexing/selection paths adjusted to avoid ambiguous Series | DataFrame behavior in exporter logic.
    • Explicit typing around Qt/pandas boundaries where inference was too loose.
  • Unsolvable / constrained typing issues

    • The major remaining ecosystem limitation is PySide6 attribute resolution noise (enum/attribute surface and dynamic Qt patterns), which generated high-volume false positives under ty.
    • Temporarily added unresolved-attribute = "ignore"

    Addresses Improve type hints and add type checking #32

@Lucia-Poma Lucia-Poma merged commit 573b879 into Brain-Modulation-Lab:main Apr 15, 2026
2 checks passed
@richardkoehler richardkoehler deleted the feat/add-typing branch April 20, 2026 17:09
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.

2 participants