Skip to content

Remove supported runtime-import suppressions - #3216

Merged
adamtheturtle merged 1 commit into
mainfrom
codex/teach-ruff-beartype
Sep 9, 2026
Merged

adamtheturtle merged 1 commit into
mainfrom
codex/teach-ruff-beartype

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Ruff's type-checking rules did not know that annotations on directly beartype-decorated functions are evaluated at runtime. This configured that public decorator explicitly and removes the corresponding inline suppressions.

Test modules now postpone annotations and place genuinely type-only imports behind TYPE_CHECKING. Imports used by methods on class-decorated clients remain in place because beartype evaluates those annotations at runtime and Ruff does not model class decorators here.

Validation: full pre-commit and pre-push hook suites.

@adamtheturtle
adamtheturtle force-pushed the codex/teach-ruff-beartype branch from 3bdabd3 to 43f2168 Compare September 9, 2026 09:35
@adamtheturtle
adamtheturtle merged commit 81bd515 into main Sep 9, 2026
13 checks passed
@adamtheturtle
adamtheturtle deleted the codex/teach-ruff-beartype branch September 9, 2026 10:17
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