From 55b8ff2055aeb212d3412fb18df3ccc44553d074 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 11 Feb 2026 10:27:19 -0500 Subject: [PATCH] Add note about fallback behavior to `python` in `PATH` (#2787) Ref https://github.com/astral-sh/ruff/pull/22843#issuecomment-3884941254 --- docs/type-checking.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/type-checking.md b/docs/type-checking.md index f7cd9dc..1edb1fd 100644 --- a/docs/type-checking.md +++ b/docs/type-checking.md @@ -21,8 +21,9 @@ The type checker needs to discover your installed packages in order to check you dependencies. ty will find installed packages in the active virtual environment (via `VIRTUAL_ENV`) or discover a -virtual environment named `.venv` in the project root or working directory. It will not find -packages in non-virtual environments without specifying the target path with `--python`. +virtual environment named `.venv` in the project root or working directory. Failing that, ty will +look for a `python3` or `python` binary available in `PATH`. Alternatively, the `--python` flag can +be provided to ty to explicitly specify a path to a Python interpreter. See the [module discovery](./modules.md) documentation for details.