[ty] Resolve python environment in Options::to_program_settings#18960
Merged
MichaReiser merged 3 commits intomainfrom Jun 26, 2025
Merged
[ty] Resolve python environment in Options::to_program_settings#18960MichaReiser merged 3 commits intomainfrom
Options::to_program_settings#18960MichaReiser merged 3 commits intomainfrom
Conversation
Contributor
|
464dce8 to
e797bf9
Compare
MichaReiser
commented
Jun 26, 2025
Comment on lines
-569
to
-570
| Cause: Invalid search path settings | ||
| Cause: Failed to discover the site-packages directory |
Member
Author
There was a problem hiding this comment.
I could try to add those again but I actually don't find them very useful (the message on line 571 contains everything the user needs to know)
Member
There was a problem hiding this comment.
yeah I agree, it seems nicer this way. More concise but no less information.
e797bf9 to
328ef2d
Compare
Contributor
|
AlexWaygood
approved these changes
Jun 26, 2025
Member
AlexWaygood
left a comment
There was a problem hiding this comment.
Thank you, this is so much better
Co-authored-by: Alex Waygood <[email protected]>
AlexWaygood
approved these changes
Jun 26, 2025
dcreager
added a commit
that referenced
this pull request
Jun 27, 2025
* main: [ty] Add builtins to completions derived from scope (#18982) [ty] Don't add incorrect subdiagnostic for unresolved reference (#18487) [ty] Simplify `KnownClass::check_call()` and `KnownFunction::check_call()` (#18981) [ty] Add micro-benchmark for #711 (#18979) [`flake8-annotations`] Make `ANN401` example error out-of-the-box (#18974) [`flake8-async`] Make `ASYNC110` example error out-of-the-box (#18975) [pandas]: Fix issue on `non pandas` dataframe `in-place` usage (PD002) (#18963) [`pylint`] Fix `PLC0415` example (#18970) [ty] Add environment variable to dump Salsa memory usage stats (#18928) [`pylint`] Fix `PLW0108` autofix introducing a syntax error when the lambda's body contains an assignment expression (#18678) Bump 0.12.1 (#18969) [`FastAPI`] Add fix safety section to `FAST002` (#18940) [ty] Add regression test for leading tab mis-alignment in diagnostic rendering (#18965) [ty] Resolve python environment in `Options::to_program_settings` (#18960) [`ruff`] Fix false positives and negatives in `RUF010` (#18690) [ty] Fix rendering of long lines that are indented with tabs [ty] Add regression test for diagnostic rendering panic [ty] Move venv and conda env discovery to `SearchPath::from_settings` (#18938)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves the discovery of the Python environment from
SearchPaths::from_settingstoOptions::to_program_settings. This allows us to remove thePythonEnvironmentPathenum which we used to parametrizeSearchPaths::from_settingswhether it should discover the site packages paths because we didn't want that behavior in tests or when the user explicitly specified an environment.I didn't move
site_packages.rsbecause we depend on it fromty_testand moving it toty_projectwould require introducing a new dependency.Test Plan