Skip to content

Fix mypy errors in example tutorials - #1703

Open
riturajarvind149 wants to merge 1 commit into
openml:mainfrom
riturajarvind149:fix-mypy-1696
Open

Fix mypy errors in example tutorials#1703
riturajarvind149 wants to merge 1 commit into
openml:mainfrom
riturajarvind149:fix-mypy-1696

Conversation

@riturajarvind149

@riturajarvind149 riturajarvind149 commented Mar 7, 2026

Copy link
Copy Markdown

This PR fixes mypy type checking errors in several example tutorial scripts.

Changes made:

  • Added checks for Optional values before indexing.
  • Ensured safer handling of variables such as tasks and targets.
  • Updated example scripts to avoid mypy errors while keeping the tutorial logic unchanged.

Files modified:

  • examples/Basics/simple_datasets_tutorial.py
  • examples/Basics/simple_suites_tutorial.py
  • examples/Basics/simple_flows_and_runs_tutorial.py

All changes were verified by running:

pre-commit run --all-files

and ensuring that mypy checks pass successfully.

Fixes #1696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant