Skip to content

Move annotation-only conftest imports - #3232

Merged
adamtheturtle merged 1 commit into
mainfrom
cleanup-conftest-runtime-imports
Sep 12, 2026
Merged

adamtheturtle merged 1 commit into
mainfrom
cleanup-conftest-runtime-imports

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

conftest.py imported io and Generator at runtime solely for fixture annotations and then suppressed Ruff's runtime-import diagnostics. Unlike the package service classes, this file is not class-decorated by Beartype, so those imports do not need to wait for Beartype 0.23.

Enable postponed annotation evaluation and move both imports behind TYPE_CHECKING. The fixture behavior is unchanged and the two TC003 ignores are removed.

Validation:

  • all configured pre-commit hooks
  • all configured pre-push hooks
  • all configured manual hooks
  • full test suite: 467 passed
  • coverage: 100.00%

@adamtheturtle
adamtheturtle merged commit 38a63b7 into main Sep 12, 2026
13 checks passed
@adamtheturtle
adamtheturtle deleted the cleanup-conftest-runtime-imports branch September 12, 2026 14:49
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