mirror of
https://github.com/astral-sh/ty.git
synced 2025-12-23 05:36:53 +00:00
Merge abf00f107a into 02351f9fa9
This commit is contained in:
commit
501faf516e
2 changed files with 24 additions and 0 deletions
|
|
@ -60,3 +60,11 @@ The Python environment may be explicitly configured using the
|
|||
[`--python`](./reference/cli.md#ty-check--python) flag.
|
||||
|
||||
When setting the environment explicitly, non-virtual environments can be provided.
|
||||
|
||||
## PYTHONPATH
|
||||
|
||||
Python supports setting the `PYTHONPATH` environment variable to control module lookup
|
||||
per-environment.
|
||||
|
||||
If ty should read this environment variable for lookup paths
|
||||
[`environment.read-python-path`](./reference/configuration.md#read-python-path) should be set to true.
|
||||
|
|
|
|||
16
docs/reference/configuration.md
generated
16
docs/reference/configuration.md
generated
|
|
@ -52,6 +52,22 @@ configuration setting.
|
|||
extra-paths = ["./shared/my-search-path"]
|
||||
```
|
||||
|
||||
### `read-python-path`
|
||||
|
||||
Boolean to indicate if ty should read paths found in the `PYTHONPATH` environment variable.
|
||||
This may be needed by tools which setup python library paths on a per-shell basis.
|
||||
|
||||
**Default value**: `false`
|
||||
|
||||
**Type**: `bool`
|
||||
|
||||
**Example usage** (`pyproject.toml`):
|
||||
|
||||
```toml
|
||||
[tool.ty.environment]
|
||||
read-python-path = true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `python`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue