Skip to content

Commit

Permalink
Update ruff's JSON schema (#4204)
Browse files Browse the repository at this point in the history
This updates ruff's JSON schema to [fbf140a665629ce31191e56918bec6a724a24617](astral-sh/ruff@fbf140a)
  • Loading branch information
dhruvmanila authored Nov 8, 2024
1 parent a716078 commit 1c1b312
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/schemas/json/ruff.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"type": ["boolean", "null"]
},
"src": {
"description": "The directories to consider when resolving first- vs. third-party imports.\n\nWhen omitted, the `src` directory will typically default to including both:\n\n1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (the \"project root\"). 2. The `\"src\"` subdirectory of the project root.\n\nThese defaults ensure that uv supports both flat layouts and `src` layouts out-of-the-box. (If a configuration file is explicitly provided (e.g., via the `--config` command-line flag), the current working directory will be considered the project root.)\n\nAs an example, consider an alternative project structure, like:\n\n```text my_project ├── pyproject.toml └── lib └── my_package ├── __init__.py ├── foo.py └── bar.py ```\n\nIn this case, the `./lib` directory should be included in the `src` option (e.g., `src = [\"lib\"]`), such that when resolving imports, `my_package.foo` is considered first-party.\n\nThis field supports globs. For example, if you have a series of Python packages in a `python_modules` directory, `src = [\"python_modules/*\"]` would expand to incorporate all packages in that directory. User home directory and environment variables will also be expanded.",
"description": "The directories to consider when resolving first- vs. third-party imports.\n\nWhen omitted, the `src` directory will typically default to including both:\n\n1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (the \"project root\"). 2. The `\"src\"` subdirectory of the project root.\n\nThese defaults ensure that Ruff supports both flat layouts and `src` layouts out-of-the-box. (If a configuration file is explicitly provided (e.g., via the `--config` command-line flag), the current working directory will be considered the project root.)\n\nAs an example, consider an alternative project structure, like:\n\n```text my_project ├── pyproject.toml └── lib └── my_package ├── __init__.py ├── foo.py └── bar.py ```\n\nIn this case, the `./lib` directory should be included in the `src` option (e.g., `src = [\"lib\"]`), such that when resolving imports, `my_package.foo` is considered first-party.\n\nThis field supports globs. For example, if you have a series of Python packages in a `python_modules` directory, `src = [\"python_modules/*\"]` would expand to incorporate all packages in that directory. User home directory and environment variables will also be expanded.",
"type": ["array", "null"],
"items": {
"type": "string"
Expand Down Expand Up @@ -2726,6 +2726,7 @@
"FURB181",
"FURB187",
"FURB188",
"FURB189",
"FURB19",
"FURB192",
"G",
Expand Down Expand Up @@ -3426,6 +3427,8 @@
"SIM40",
"SIM401",
"SIM9",
"SIM90",
"SIM905",
"SIM91",
"SIM910",
"SIM911",
Expand Down Expand Up @@ -3539,6 +3542,7 @@
"UP041",
"UP042",
"UP043",
"UP044",
"W",
"W1",
"W19",
Expand Down

0 comments on commit 1c1b312

Please sign in to comment.