mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[ty] Fix incorrect type of src.root
in documentation (#18040)
This commit is contained in:
parent
fcd858e0c8
commit
be6ec613db
3 changed files with 7 additions and 7 deletions
|
@ -162,17 +162,17 @@ typeshed = "/path/to/custom/typeshed"
|
|||
|
||||
#### `root`
|
||||
|
||||
The root(s) of the project, used for finding first-party modules.
|
||||
The root of the project, used for finding first-party modules.
|
||||
|
||||
**Default value**: `[".", "./src"]`
|
||||
|
||||
**Type**: `list[str]`
|
||||
**Type**: `str`
|
||||
|
||||
**Example usage** (`pyproject.toml`):
|
||||
|
||||
```toml
|
||||
[tool.ty.src]
|
||||
root = ["./app"]
|
||||
root = "./app"
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
@ -352,13 +352,13 @@ pub struct EnvironmentOptions {
|
|||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct SrcOptions {
|
||||
/// The root(s) of the project, used for finding first-party modules.
|
||||
/// The root of the project, used for finding first-party modules.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[option(
|
||||
default = r#"[".", "./src"]"#,
|
||||
value_type = "list[str]",
|
||||
value_type = "str",
|
||||
example = r#"
|
||||
root = ["./app"]
|
||||
root = "./app"
|
||||
"#
|
||||
)]
|
||||
pub root: Option<RelativePathBuf>,
|
||||
|
|
|
@ -839,7 +839,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"root": {
|
||||
"description": "The root(s) of the project, used for finding first-party modules.",
|
||||
"description": "The root of the project, used for finding first-party modules.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue