mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:37 +00:00
[ty] Include python
folder in environment.root
if it exists (#20263)
## Summary I felt it was safer to add the `python` folder *in addition* to a possibly-existing `src` folder, even though the `src` folder only contains Rust code for `maturin`-based projects. There might be non-maturin projects where a `python` folder exists for other reasons, next to a normal `src` layout. closes https://github.com/astral-sh/ty/issues/1120 ## Test Plan Tested locally on the egglog-python project.
This commit is contained in:
parent
8ade6c4eaf
commit
7ee863b6d7
4 changed files with 144 additions and 3 deletions
2
crates/ty/docs/configuration.md
generated
2
crates/ty/docs/configuration.md
generated
|
@ -144,7 +144,7 @@ If left unspecified, ty will try to detect common project layouts and initialize
|
|||
* if a `./<project-name>/<project-name>` directory exists, include `.` and `./<project-name>` in the first party search path
|
||||
* otherwise, default to `.` (flat layout)
|
||||
|
||||
Besides, if a `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` file),
|
||||
Besides, if a `./python` or `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` or `__init__.pyi` file),
|
||||
it will also be included in the first party search path.
|
||||
|
||||
**Default value**: `null`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue