-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Micha Reiser <micha@reiser.io>
- Loading branch information
1 parent
f2ac348
commit 0fee9d2
Showing
49 changed files
with
325 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
//! Extract Black configuration settings from a pyproject.toml. | ||
use ruff_linter::line_width::LineLength; | ||
use ruff_linter::line_width::LineWidth; | ||
use ruff_linter::settings::types::PythonVersion; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Default)] | ||
pub(crate) struct Black { | ||
#[serde(alias = "line-length", alias = "line_length")] | ||
pub(crate) line_length: Option<LineLength>, | ||
pub(crate) line_length: Option<LineWidth>, | ||
#[serde(alias = "target-version", alias = "target_version")] | ||
pub(crate) target_version: Option<Vec<PythonVersion>>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{"run_id":"1697613922-116275000","line":77,"new":{"module_name":"format","snapshot_name":"format_options","metadata":{"source":"crates/ruff_cli/tests/format.rs","assertion_line":64,"info":{"program":"ruff","args":["format","--config","/var/folders/pp/d0k78q8950s62486c1rt6zjw0000gn/T/.tmpYncQIu/ruff.toml","-"],"stdin":"\ndef foo(arg1, arg2,):\n print(\"Shouldn't change quotes. It exceeds the line width with the tab size 8\")\n\n\nif condition:\n\n print(\"Should change quotes\")\n\n"}},"snapshot":"success: true\nexit_code: 0\n----- stdout -----\ndef foo(arg1, arg2):\n\tprint(\n\t\t\"Shouldn't change quotes. It exceeds the line width with the tab size 8\"\n\t)\n\n\nif condition:\n\tprint('Should change quotes')\n\n----- stderr -----\nwarning: `ruff format` is not yet stable, and subject to change in future versions.\nwarning: The option `line-length` has been renamed to `line-width` to emphasize that the limit is the display width of a line and not the number of characters. Use `line-width` instead.\n"},"old":{"module_name":"format","metadata":{},"snapshot":"success: true\nexit_code: 0\n----- stdout -----\ndef foo(arg1, arg2):\n\tprint(\n\t\t\"Shouldn't change quotes. It exceeds the line width with the tab size 8\"\n\t)\n\n\nif condition:\n\tprint('Should change quotes')\n\n----- stderr -----\nwarning: `ruff format` is not yet stable, and subject to change in future versions."}} | ||
{"run_id":"1697614864-891604000","line":221,"new":null,"old":null} | ||
{"run_id":"1697614864-891604000","line":64,"new":null,"old":null} | ||
{"run_id":"1697614864-891604000","line":179,"new":null,"old":null} | ||
{"run_id":"1697614864-891604000","line":269,"new":null,"old":null} | ||
{"run_id":"1697614864-891604000","line":15,"new":null,"old":null} | ||
{"run_id":"1697614864-891604000","line":144,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":15,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":144,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":179,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":269,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":64,"new":null,"old":null} | ||
{"run_id":"1697615157-557926000","line":221,"new":null,"old":null} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/ruff_linter/resources/test/fixtures/isort/detect_same_package/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[tool.ruff] | ||
line-length = 88 | ||
line-width = 88 |
2 changes: 1 addition & 1 deletion
2
crates/ruff_linter/resources/test/fixtures/isort/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.ruff] | ||
line-length = 88 | ||
line-width = 88 | ||
|
||
[tool.ruff.isort] | ||
lines-after-imports = 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.ruff] | ||
line-length = 88 | ||
line-width = 88 | ||
extend-exclude = [ | ||
"excluded_file.py", | ||
"migrations", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.