Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Validate deprecated warning categories#26025

Merged
charliermarsh merged 2 commits into
mainfrom
charlie/validate-deprecated-category
Jun 15, 2026
Merged

[ty] Validate deprecated warning categories#26025
charliermarsh merged 2 commits into
mainfrom
charlie/validate-deprecated-category

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

Validate the category argument to warnings.deprecated and typing_extensions.deprecated against their declared type[Warning] | None signature.

The synthesized signature previously modeled this argument as Any, so invalid values such as category=42 were silently accepted. Warning subclasses and None remain valid, and invalid values now receive the standard argument-type diagnostic.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 15, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 94.37%. The percentage of expected errors that received a diagnostic held steady at 89.00%. The number of fully passing files held steady at 94/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@charliermarsh charliermarsh force-pushed the charlie/validate-deprecated-category branch from 9a6e0be to e930aba Compare June 15, 2026 21:18
@charliermarsh charliermarsh marked this pull request as ready for review June 15, 2026 21:24
@charliermarsh charliermarsh requested a review from a team as a code owner June 15, 2026 21:24
@astral-sh-bot astral-sh-bot Bot requested a review from carljm June 15, 2026 21:24
@charliermarsh charliermarsh force-pushed the charlie/validate-deprecated-category branch from e930aba to 0935e22 Compare June 15, 2026 21:25
Comment thread crates/ty_python_semantic/src/types.rs Outdated
@charliermarsh charliermarsh enabled auto-merge (squash) June 15, 2026 22:06
@charliermarsh charliermarsh merged commit 59580b5 into main Jun 15, 2026
59 checks passed
@charliermarsh charliermarsh deleted the charlie/validate-deprecated-category branch June 15, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants