Skip to content

Comments

Add @beartype to pytest_collection_modifyitems hook#2866

Merged
adamtheturtle merged 1 commit intomainfrom
add-beartype-to-test-helpers
Feb 22, 2026
Merged

Add @beartype to pytest_collection_modifyitems hook#2866
adamtheturtle merged 1 commit intomainfrom
add-beartype-to-test-helpers

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 22, 2026

Summary

  • Add @beartype decorator to pytest_collection_modifyitems in root conftest.py, which was the only non-fixture test helper missing it

Test plan

  • CI passes with existing tests

Made with Cursor


Note

Low Risk
Test-only change that adds runtime type checking to a pytest hook; risk is limited to potential new type errors during collection.

Overview
Adds @beartype to the pytest_collection_modifyitems hook in conftest.py, so the hook itself is runtime type-checked like the rest of the test helpers.

No behavioral changes beyond enabling beartype validation when pytest invokes this hook during test collection.

Written by Cursor Bugbot for commit a99022f. This will update automatically on new commits. Configure here.

Add runtime type checking to the pytest hook that was missing it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@adamtheturtle adamtheturtle merged commit 4a497c2 into main Feb 22, 2026
16 checks passed
@adamtheturtle adamtheturtle deleted the add-beartype-to-test-helpers branch February 22, 2026 01:02
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.

1 participant