Skip to content

[ty] Retain typing-only symbols in explicit completions - #27435

Merged
charliermarsh merged 3 commits into
mainfrom
charlie/ty-type-only-completion-ranking
Aug 4, 2026
Merged

[ty] Retain typing-only symbols in explicit completions#27435
charliermarsh merged 3 commits into
mainfrom
charlie/ty-type-only-completion-ranking

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

We now exclude private type variables, parameter specifications, type-variable tuples, aliases, and @type_check_only definitions from completions, even though those names can be explicitly imported in typing-only contexts:

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from package import _Alias, _T

This PR makes those definitions consistent with existing @type_check_only completion behavior: retain them as explicit import and attribute completions, mark them as typing-only, and rank them below runtime values.

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

astral-sh-bot Bot commented Aug 3, 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 96.95%. The percentage of expected errors that received a diagnostic held steady at 92.39%. The number of fully passing files held steady at 102/133.

@astral-sh-bot

astral-sh-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Aug 3, 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 marked this pull request as ready for review August 3, 2026 18:32
@charliermarsh
charliermarsh requested review from a team as code owners August 3, 2026 18:32
@astral-sh-bot
astral-sh-bot Bot requested a review from dhruvmanila August 3, 2026 18:32
@charliermarsh
charliermarsh requested review from AlexWaygood and MichaReiser and removed request for dhruvmanila August 3, 2026 18:32

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@charliermarsh
charliermarsh force-pushed the charlie/ty-type-only-completion-ranking branch from 613c4c9 to 09af803 Compare August 4, 2026 13:36
@charliermarsh
charliermarsh enabled auto-merge (squash) August 4, 2026 13:36
@charliermarsh
charliermarsh merged commit d82ee58 into main Aug 4, 2026
62 checks passed
@charliermarsh
charliermarsh deleted the charlie/ty-type-only-completion-ranking branch August 4, 2026 13:43
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