Skip to content

[Repo Assist] test: fix pyright strict-mode errors in tests/test_subject/#762

Merged
dbrattli merged 2 commits intomasterfrom
repo-assist/pyright-cleanup-test-subject-scheduler-2026-04-17-e214b615e3b8b313
Apr 20, 2026
Merged

[Repo Assist] test: fix pyright strict-mode errors in tests/test_subject/#762
dbrattli merged 2 commits intomasterfrom
repo-assist/pyright-cleanup-test-subject-scheduler-2026-04-17-e214b615e3b8b313

Conversation

@dbrattli
Copy link
Copy Markdown
Collaborator

  • Add type annotations to closure container lists (list[T | None])
  • Add type annotations to scheduler callback parameters
  • Add assert narrowing before attribute access on nullable list items
  • Fix on_error("ex") -> on_error(Exception("ex")) (real type bug)
  • Remove unused _raise helper functions
  • Remove SchedulerBase import where not needed
  • Remove tests/test_subject/ from pyright exclude list in pyproject.toml

All 21 tests pass. Full pyright: 0 errors. Ruff: 0 errors.

github-actions Bot and others added 2 commits April 20, 2026 22:07
- Add type annotations to closure container lists (list[T | None])
- Add type annotations to scheduler callback parameters
- Add assert narrowing before attribute access on nullable list items
- Fix on_error("ex") -> on_error(Exception("ex")) (real type bug)
- Remove unused _raise helper functions
- Remove SchedulerBase import where not needed
- Remove tests/test_subject/ from pyright exclude list in pyproject.toml

All 21 tests pass. Full pyright: 0 errors. Ruff: 0 errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sistency

Match the style already used in test_asyncsubject.py and test_subject.py
so all four files use the same pattern before accessing subject[0].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli force-pushed the repo-assist/pyright-cleanup-test-subject-scheduler-2026-04-17-e214b615e3b8b313 branch from 3e31d41 to 53d42f4 Compare April 20, 2026 20:09
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 93.512% (+0.06%) from 93.448% — repo-assist/pyright-cleanup-test-subject-scheduler-2026-04-17-e214b615e3b8b313 into master

@dbrattli dbrattli merged commit 5268dde into master Apr 20, 2026
42 checks passed
@dbrattli dbrattli deleted the repo-assist/pyright-cleanup-test-subject-scheduler-2026-04-17-e214b615e3b8b313 branch April 20, 2026 20:13
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