mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 14:03:55 -05:00
Fix formatting
This commit is contained in:
parent
dbb74c371a
commit
6a6ad1e96e
1 changed files with 18 additions and 18 deletions
|
|
@ -13,8 +13,8 @@ use ninja_gen::input::BuildInput;
|
||||||
use ninja_gen::inputs;
|
use ninja_gen::inputs;
|
||||||
use ninja_gen::python::python_format;
|
use ninja_gen::python::python_format;
|
||||||
use ninja_gen::python::PythonEnvironment;
|
use ninja_gen::python::PythonEnvironment;
|
||||||
use ninja_gen::python::RuffCheck;
|
|
||||||
use ninja_gen::python::PythonTypecheck;
|
use ninja_gen::python::PythonTypecheck;
|
||||||
|
use ninja_gen::python::RuffCheck;
|
||||||
use ninja_gen::Build;
|
use ninja_gen::Build;
|
||||||
|
|
||||||
/// Normalize version string by removing leading zeros from numeric parts
|
/// Normalize version string by removing leading zeros from numeric parts
|
||||||
|
|
@ -197,28 +197,28 @@ pub fn check_python(build: &mut Build) -> Result<()> {
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let ruff_folders = &[
|
let ruff_folders = &["qt/aqt", "ftl", "pylib/tools", "tools", "python"];
|
||||||
"qt/aqt",
|
|
||||||
"ftl",
|
|
||||||
"pylib/tools",
|
|
||||||
"tools",
|
|
||||||
"python",
|
|
||||||
];
|
|
||||||
let ruff_deps = inputs![
|
let ruff_deps = inputs![
|
||||||
glob!["{pylib,ftl,qt,python,tools}/**/*.py"],
|
glob!["{pylib,ftl,qt,python,tools}/**/*.py"],
|
||||||
":pylib:anki",
|
":pylib:anki",
|
||||||
":qt:aqt"
|
":qt:aqt"
|
||||||
];
|
];
|
||||||
build.add_action("check:ruff", RuffCheck {
|
build.add_action(
|
||||||
folders: ruff_folders,
|
"check:ruff",
|
||||||
deps: ruff_deps.clone(),
|
RuffCheck {
|
||||||
check_only: true,
|
folders: ruff_folders,
|
||||||
})?;
|
deps: ruff_deps.clone(),
|
||||||
build.add_action("fix:ruff", RuffCheck {
|
check_only: true,
|
||||||
folders: ruff_folders,
|
},
|
||||||
deps: ruff_deps,
|
)?;
|
||||||
check_only: false,
|
build.add_action(
|
||||||
})?;
|
"fix:ruff",
|
||||||
|
RuffCheck {
|
||||||
|
folders: ruff_folders,
|
||||||
|
deps: ruff_deps,
|
||||||
|
check_only: false,
|
||||||
|
},
|
||||||
|
)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue