[ty] Correct project option documentation
diff --git a/crates/ty/docs/cli.md b/crates/ty/docs/cli.md index c830666..52394af 100644 --- a/crates/ty/docs/cli.md +++ b/crates/ty/docs/cli.md
@@ -77,8 +77,8 @@ <li><code>gitlab</code>: Print diagnostics in the JSON format expected by GitLab Code Quality reports</li> <li><code>github</code>: Print diagnostics in the format used by GitHub Actions workflow error annotations</li> <li><code>junit</code>: Print diagnostics as a JUnit-style XML report</li> -</ul></dd><dt id="ty-check--project"><a href="#ty-check--project"><code>--project</code></a> <i>project</i></dt><dd><p>Run the command within the given project directory.</p> -<p>All <code>pyproject.toml</code> files will be discovered by walking up the directory tree from the given project directory, as will the project's virtual environment (<code>.venv</code>) unless the <code>venv-path</code> option is set.</p> +</ul></dd><dt id="ty-check--project"><a href="#ty-check--project"><code>--project</code></a> <i>project</i></dt><dd><p>Discover the project from the given directory.</p> +<p>ty searches for configuration files by walking up the directory tree from the given directory. The discovered project root is also used to find the project's virtual environment (<code>.venv</code>) and to determine which files to check when no paths are provided.</p> <p>Other command-line arguments (such as relative paths) will be resolved relative to the current working directory.</p> </dd><dt id="ty-check--python"><a href="#ty-check--python"><code>--python</code></a>, <code>--venv</code> <i>path</i></dt><dd><p>Path to your project's Python environment or interpreter.</p> <p>ty uses your Python environment to resolve third-party imports in your code.</p>
diff --git a/crates/ty/src/args.rs b/crates/ty/src/args.rs index 56972b3..9893e88 100644 --- a/crates/ty/src/args.rs +++ b/crates/ty/src/args.rs
@@ -77,10 +77,11 @@ #[arg(long, conflicts_with("fix"))] pub(crate) add_ignore: bool, - /// Run the command within the given project directory. + /// Discover the project from the given directory. /// - /// All `pyproject.toml` files will be discovered by walking up the directory tree from the given project directory, - /// as will the project's virtual environment (`.venv`) unless the `venv-path` option is set. + /// ty searches for configuration files by walking up the directory tree from the given directory. + /// The discovered project root is also used to find the project's virtual environment (`.venv`) + /// and to determine which files to check when no paths are provided. /// /// Other command-line arguments (such as relative paths) will be resolved relative to the current working directory. #[arg(long, value_name = "PROJECT")]