mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-17 11:22:55 +00:00
Update analyze_graph.rs
This commit is contained in:
parent
0ee00edcdf
commit
2cc5cb708a
1 changed files with 32 additions and 32 deletions
|
|
@ -27,43 +27,43 @@ fn type_checking_imports() -> anyhow::Result<()> {
|
||||||
("ruff/c.py", ""),
|
("ruff/c.py", ""),
|
||||||
])?;
|
])?;
|
||||||
|
|
||||||
assert_cmd_snapshot!(test.analyze_graph_command(), @r###"
|
assert_cmd_snapshot!(test.analyze_graph_command(), @r#"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
{
|
{
|
||||||
"ruff/__init__.py": [],
|
"ruff\/__init__.py": [],
|
||||||
"ruff/a.py": [
|
"ruff\\a.py": [
|
||||||
"ruff/b.py",
|
"ruff\\b.py",
|
||||||
"ruff/c.py"
|
"ruff\\c.py"
|
||||||
],
|
],
|
||||||
"ruff/b.py": [
|
"ruff\\b.py": [
|
||||||
"ruff/c.py"
|
"ruff\\c.py"
|
||||||
],
|
],
|
||||||
"ruff/c.py": []
|
"ruff\\c.py": []
|
||||||
}
|
}
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
"###);
|
"#);
|
||||||
|
|
||||||
assert_cmd_snapshot!(
|
assert_cmd_snapshot!(
|
||||||
test.analyze_graph_command()
|
test.analyze_graph_command()
|
||||||
.arg("--no-type-checking-imports"),
|
.arg("--no-type-checking-imports"),
|
||||||
@r###"
|
@r#"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
{
|
{
|
||||||
"ruff/__init__.py": [],
|
"ruff\/__init__.py": [],
|
||||||
"ruff/a.py": [
|
"ruff\\a.py": [
|
||||||
"ruff/b.py"
|
"ruff\\b.py"
|
||||||
],
|
],
|
||||||
"ruff/b.py": [],
|
"ruff\\b.py": [],
|
||||||
"ruff/c.py": []
|
"ruff\\c.py": []
|
||||||
}
|
}
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
"###
|
"#
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
@ -101,21 +101,21 @@ fn type_checking_imports_from_config() -> anyhow::Result<()> {
|
||||||
),
|
),
|
||||||
])?;
|
])?;
|
||||||
|
|
||||||
assert_cmd_snapshot!(test.analyze_graph_command(), @r###"
|
assert_cmd_snapshot!(test.analyze_graph_command(), @r#"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
{
|
{
|
||||||
"ruff/__init__.py": [],
|
"ruff\/__init__.py": [],
|
||||||
"ruff/a.py": [
|
"ruff\\a.py": [
|
||||||
"ruff/b.py"
|
"ruff\\b.py"
|
||||||
],
|
],
|
||||||
"ruff/b.py": [],
|
"ruff\\b.py": [],
|
||||||
"ruff/c.py": []
|
"ruff\\c.py": []
|
||||||
}
|
}
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
"###);
|
"#);
|
||||||
|
|
||||||
test.write_file(
|
test.write_file(
|
||||||
"ruff.toml",
|
"ruff.toml",
|
||||||
|
|
@ -125,24 +125,24 @@ fn type_checking_imports_from_config() -> anyhow::Result<()> {
|
||||||
"#,
|
"#,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
assert_cmd_snapshot!(test.analyze_graph_command(), @r###"
|
assert_cmd_snapshot!(test.analyze_graph_command(), @r#"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
{
|
{
|
||||||
"ruff/__init__.py": [],
|
"ruff\/__init__.py": [],
|
||||||
"ruff/a.py": [
|
"ruff\\a.py": [
|
||||||
"ruff/b.py",
|
"ruff\\b.py",
|
||||||
"ruff/c.py"
|
"ruff\\c.py"
|
||||||
],
|
],
|
||||||
"ruff/b.py": [
|
"ruff\\b.py": [
|
||||||
"ruff/c.py"
|
"ruff\\c.py"
|
||||||
],
|
],
|
||||||
"ruff/c.py": []
|
"ruff\\c.py": []
|
||||||
}
|
}
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
"###
|
"#
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue