Skip to content

[ty] Reject unsupported environment.python-version values in configuration files#24402

Merged
charliermarsh merged 1 commit intomainfrom
charlie/display-types-ii
Apr 5, 2026
Merged

[ty] Reject unsupported environment.python-version values in configuration files#24402
charliermarsh merged 1 commit intomainfrom
charlie/display-types-ii

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Summary

If a user specifies an unsupported value in environment.python-version, we need to reject it, like we do on the CLI.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Apr 4, 2026
@charliermarsh charliermarsh force-pushed the charlie/display-types-ii branch from 6934d51 to 6980a4b Compare April 4, 2026 03:23
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 4, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 87.72%. The percentage of expected errors that received a diagnostic held steady at 82.85%. The number of fully passing files held steady at 74/132.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 4, 2026

Memory usage report

Memory usage unchanged ✅

@charliermarsh charliermarsh marked this pull request as ready for review April 4, 2026 03:26
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 4, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-await 0 40 0
invalid-return-type 0 1 0
Total 0 41 0

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Full report with detailed diff (timing results)

@charliermarsh charliermarsh force-pushed the charlie/display-types-ii branch 2 times, most recently from 04af746 to 9249632 Compare April 4, 2026 03:40
Base automatically changed from charlie/display-types-i to main April 5, 2026 00:18
@charliermarsh charliermarsh force-pushed the charlie/display-types-ii branch from 9249632 to 0c4c6a2 Compare April 5, 2026 00:19
@charliermarsh charliermarsh enabled auto-merge (squash) April 5, 2026 00:19
@charliermarsh charliermarsh merged commit f6ef72c into main Apr 5, 2026
51 checks passed
@charliermarsh charliermarsh deleted the charlie/display-types-ii branch April 5, 2026 00:23
charliermarsh added a commit that referenced this pull request Apr 10, 2026
## Summary

Like #24402, we want to ignore
unsupported Python versions that come from the editor. Instead, we'll
fall back to the default version (if there's no other configuration
set).

One nuance here is that we don't actively show the user a popup if we
ignore this version; we just use `tracing::warn!("{message}")`. It seems
undesirable to show a popup at the conversion site, since we'd then be
showing it even if the fallback version were never used. Is it desirable
to show a popup _ever_?
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.

3 participants