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:
Jerens Lensun 2025-07-04 20:21:48 +08:00 committed by GitHub
parent b9347bf302
commit 5eb7c397fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 7 deletions

View file

@ -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` /// Note: This function should be kept in sync with the version in `components/script/build.rs`
fn find_python() -> Command { fn find_python() -> Command {
let mut command = Command::new("uv"); 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()) { if command.output().is_ok_and(|out| out.status.success()) {
return command; return command;

View file

@ -34,7 +34,7 @@ fn main() {
/// Note: This function should be kept in sync with the version in `components/script/build.rs` /// Note: This function should be kept in sync with the version in `components/script/build.rs`
fn find_python() -> Command { fn find_python() -> Command {
let mut command = Command::new("uv"); 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()) { if command.output().is_ok_and(|out| out.status.success()) {
return command; return command;

2
mach
View file

@ -30,7 +30,7 @@
fi 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 "$@"
} }
''' '''

View file

@ -1,4 +1,4 @@
@echo off @echo off
set workdir=%~dp0 set workdir=%~dp0
uv run python %workdir%mach %* uv run --no-project python %workdir%mach %*

View file

@ -1,5 +1,5 @@
[tool.ruff]
line-length = 120 line-length = 120
extend-exclude = [ extend-exclude = [
# temporary local files # temporary local files
"target/**", "target/**",
@ -12,13 +12,12 @@ extend-exclude = [
"tests/**", "tests/**",
] ]
[lint] [tool.ruff.lint]
select = [ select = [
"E", "E",
"W", "W",
"F", "F",
] ]
ignore = [ ignore = [
# Trailing whitespace; the standard tidy process will enforce no trailing whitespace # Trailing whitespace; the standard tidy process will enforce no trailing whitespace
"W291", "W291",