mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Mergeruff.toml into pyproject.toml (#37741)
add a pyproject.toml config file that includes the settings for ruff --------- Signed-off-by: Jerens Lensun <jerensslensun@gmail.com>
This commit is contained in:
@@ -87,7 +87,7 @@ impl phf_shared::PhfHash for Bytes<'_> {
|
||||
/// Note: This function should be kept in sync with the version in `components/script/build.rs`
|
||||
fn find_python() -> Command {
|
||||
let mut command = Command::new("uv");
|
||||
command.args(["run", "python"]);
|
||||
command.args(["run", "--no-project", "python"]);
|
||||
|
||||
if command.output().is_ok_and(|out| out.status.success()) {
|
||||
return command;
|
||||
|
||||
@@ -34,7 +34,7 @@ fn main() {
|
||||
/// Note: This function should be kept in sync with the version in `components/script/build.rs`
|
||||
fn find_python() -> Command {
|
||||
let mut command = Command::new("uv");
|
||||
command.args(["run", "python"]);
|
||||
command.args(["run", "--no-project", "python"]);
|
||||
|
||||
if command.output().is_ok_and(|out| out.status.success()) {
|
||||
return command;
|
||||
|
||||
2
mach
2
mach
@@ -30,7 +30,7 @@
|
||||
fi
|
||||
}
|
||||
|
||||
run_in_nix_if_needed uv run python ${MACH_DIR}/mach "$@"
|
||||
run_in_nix_if_needed uv run --no-project python ${MACH_DIR}/mach "$@"
|
||||
}
|
||||
'''
|
||||
|
||||
|
||||
2
mach.bat
2
mach.bat
@@ -1,4 +1,4 @@
|
||||
@echo off
|
||||
|
||||
set workdir=%~dp0
|
||||
uv run python %workdir%mach %*
|
||||
uv run --no-project python %workdir%mach %*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
|
||||
extend-exclude = [
|
||||
# temporary local files
|
||||
"target/**",
|
||||
@@ -12,13 +12,12 @@ extend-exclude = [
|
||||
"tests/**",
|
||||
]
|
||||
|
||||
[lint]
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E",
|
||||
"W",
|
||||
"F",
|
||||
]
|
||||
|
||||
ignore = [
|
||||
# Trailing whitespace; the standard tidy process will enforce no trailing whitespace
|
||||
"W291",
|
||||
Reference in New Issue
Block a user