Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ty] Use reachable first declaration in declaration-based diagnostics - #24564

#24564
Merged
charliermarsh merged 1 commit into
mainastral-sh/ruff:mainfrom
charlie/first-reachable-declarationsastral-sh/ruff:charlie/first-reachable-declarationsCopy head branch name to clipboard
Apr 12, 2026
Merged

[ty] Use reachable first declaration in declaration-based diagnostics#24564
charliermarsh merged 1 commit into
mainastral-sh/ruff:mainfrom
charlie/first-reachable-declarationsastral-sh/ruff:charlie/first-reachable-declarationsCopy head branch name to clipboard

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Apr 11, 2026

Copy link
Copy Markdown
Member

Summary

We now use the first reachable declaration, rather than the first declaration, in certain diagnostics, e.g.:

from typing import Final

if False:
    UNREACHABLE_MODULE_FINAL: Final[int]
else:
    # error: [final-without-value] "`Final` symbol `UNREACHABLE_MODULE_FINAL` is not assigned a value"
    UNREACHABLE_MODULE_FINAL: Final[str]

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

astral-sh-bot Bot commented Apr 11, 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 87.92%. The percentage of expected errors that received a diagnostic held steady at 83.11%. The number of fully passing files held steady at 78/133.

@astral-sh-bot

astral-sh-bot Bot commented Apr 11, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Apr 11, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@charliermarsh
charliermarsh force-pushed the charlie/first-reachable-declarations branch from ce0c87e to 3e6e8e5 Compare April 11, 2026 19:38
@charliermarsh
charliermarsh marked this pull request as ready for review April 11, 2026 19:56
@charliermarsh
charliermarsh force-pushed the charlie/first-reachable-declarations branch from 3e6e8e5 to 9ae0cab Compare April 12, 2026 12:38
@charliermarsh
charliermarsh changed the base branch from charlie/namedtuple-overrides-i to main April 12, 2026 12:39
@charliermarsh
charliermarsh force-pushed the charlie/first-reachable-declarations branch from 9ae0cab to f765880 Compare April 12, 2026 12:43
@charliermarsh
charliermarsh merged commit 0a2055a into main Apr 12, 2026
55 checks passed
@charliermarsh
charliermarsh deleted the charlie/first-reachable-declarations branch April 12, 2026 12:49
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.