mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +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`
|
#### `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"]`
|
**Default value**: `[".", "./src"]`
|
||||||
|
|
||||||
**Type**: `list[str]`
|
**Type**: `str`
|
||||||
|
|
||||||
**Example usage** (`pyproject.toml`):
|
**Example usage** (`pyproject.toml`):
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[tool.ty.src]
|
[tool.ty.src]
|
||||||
root = ["./app"]
|
root = "./app"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -352,13 +352,13 @@ pub struct EnvironmentOptions {
|
||||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
pub struct SrcOptions {
|
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")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
#[option(
|
#[option(
|
||||||
default = r#"[".", "./src"]"#,
|
default = r#"[".", "./src"]"#,
|
||||||
value_type = "list[str]",
|
value_type = "str",
|
||||||
example = r#"
|
example = r#"
|
||||||
root = ["./app"]
|
root = "./app"
|
||||||
"#
|
"#
|
||||||
)]
|
)]
|
||||||
pub root: Option<RelativePathBuf>,
|
pub root: Option<RelativePathBuf>,
|
||||||
|
|
|
@ -839,7 +839,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"root": {
|
"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": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue