Skip to content

Commit 964355f

Browse files
authored
fix: clippy py-pixi-build-backend (#409)
* Update Rust for `py-pixi-build-backend` * fix: clippy lints py-pixi-build-backend * Update lock file * Update pixi lock * Add proper encoding for windows * Add python io encoding
1 parent 4475e8b commit 964355f

File tree

9 files changed

+308
-223
lines changed

9 files changed

+308
-223
lines changed

.github/workflows/python-bindings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ concurrency:
2323
permissions:
2424
contents: read
2525

26+
env:
27+
PYTHONIOENCODING: utf-8
28+
2629
jobs:
2730
format_lint_test:
2831
name: Test the Python bindings

.github/workflows/testsuite.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
RUSTFLAGS: "-D warnings"
1717
CARGO_TERM_COLOR: always
1818
TARGET_DIR: target/pixi/ci
19+
PYTHONIOENCODING: utf-8
1920

2021
jobs:
2122
build-binary-linux-x86_64:

backends/pixi-build-ros/pixi.lock

Lines changed: 207 additions & 126 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py-pixi-build-backend/pixi.lock

Lines changed: 80 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py-pixi-build-backend/pixi.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PIP_REQUIRE_VIRTUALENV = "false"
3232
python = "*"
3333
maturin = "~=1.9.3"
3434
pip = "~=25.2.0"
35-
rust = "~=1.87.0"
35+
rust = "~=1.88.0"
3636

3737
[feature.build.target.linux-64.dependencies]
3838
patchelf = "~=0.18.0"
@@ -53,7 +53,7 @@ ruff = ">=0.13,<0.14"
5353

5454
[feature.dev.dependencies]
5555
# Development tools (IDE support)
56-
rust-src = "~=1.87.0"
56+
rust-src = "~=1.88.0"
5757

5858
[tasks]
5959
build = "maturin develop"

py-pixi-build-backend/src/recipe_stage0/conditional_requirements.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Display for PyVecItemPackageDependency {
1616
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
1717
write!(f, "[")?;
1818
for item in &self.inner {
19-
write!(f, "{}, ", item)?;
19+
write!(f, "{item}, ")?;
2020
}
2121
write!(f, "]")
2222
}
@@ -190,7 +190,7 @@ create_py_wrap!(
190190
|vec: &Vec<Item<PackageDependency>>, f: &mut Formatter<'_>| {
191191
write!(f, "[")?;
192192
for item in vec {
193-
write!(f, "{}, ", item)?;
193+
write!(f, "{item}, ")?;
194194
}
195195
write!(f, "]")
196196
}

py-pixi-build-backend/src/recipe_stage0/recipe.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use std::{collections::HashMap, ops::Deref};
2828
create_py_wrap!(PyHashMapValueString, HashMap<String, PyValueString>, |map: &HashMap<String, PyValueString>, f: &mut Formatter<'_>| {
2929
write!(f, "{{")?;
3030
for (k, v) in map {
31-
write!(f, "{}: {}, ", k, v)?;
31+
write!(f, "{k}: {v}, ")?;
3232
}
3333
write!(f, "}}")
3434
});
@@ -41,7 +41,7 @@ create_py_wrap!(PyVecItemSource, Vec<PyItemSource>, |vec: &Vec<
4141
>| {
4242
write!(f, "[")?;
4343
for item in vec {
44-
write!(f, "{}, ", item)?;
44+
write!(f, "{item}, ")?;
4545
}
4646
write!(f, "]")
4747
});
@@ -52,7 +52,7 @@ create_py_wrap!(
5252
|vec: &Vec<PyTest>, f: &mut Formatter<'_>| {
5353
write!(f, "[")?;
5454
for item in vec {
55-
write!(f, "{}, ", item)?;
55+
write!(f, "{item}, ")?;
5656
}
5757
write!(f, "]")
5858
}
@@ -63,7 +63,7 @@ create_py_wrap!(
6363
Option<PyAbout>,
6464
|opt: &Option<PyAbout>, f: &mut Formatter<'_>| {
6565
match opt {
66-
Some(about) => write!(f, "{}", about),
66+
Some(about) => write!(f, "{about}"),
6767
None => write!(f, "None"),
6868
}
6969
}
@@ -73,7 +73,7 @@ create_py_wrap!(
7373
Option<PyExtra>,
7474
|opt: &Option<PyExtra>, f: &mut Formatter<'_>| {
7575
match opt {
76-
Some(extra) => write!(f, "{}", extra),
76+
Some(extra) => write!(f, "{extra}"),
7777
None => write!(f, "None"),
7878
}
7979
}
@@ -458,7 +458,7 @@ create_py_wrap!(PyOptionValueU64, Option<PyValueU64>, |opt: &Option<
458458
'_,
459459
>| {
460460
match opt {
461-
Some(value) => write!(f, "{}", value),
461+
Some(value) => write!(f, "{value}"),
462462
None => write!(f, "None"),
463463
}
464464
});
@@ -468,7 +468,7 @@ create_py_wrap!(
468468
Option<PyNoArchKind>,
469469
|opt: &Option<PyNoArchKind>, f: &mut Formatter<'_>| {
470470
match opt {
471-
Some(value) => write!(f, "{}", value),
471+
Some(value) => write!(f, "{value}"),
472472
None => write!(f, "None"),
473473
}
474474
}
@@ -548,7 +548,7 @@ impl Display for PyBuild {
548548
create_py_wrap!(PyHashMap, HashMap<String, String>, |map: &HashMap<String, String>, f: &mut Formatter<'_>| {
549549
write!(f, "{{")?;
550550
for (k, v) in map {
551-
write!(f, "{}: {}, ", k, v)?;
551+
write!(f, "{k}: {v}, ")?;
552552
}
553553
write!(f, "}}")
554554
});

0 commit comments

Comments
 (0)