Skip to content

Commit 1a171ad

Browse files
fix: cursor
1 parent 5f47886 commit 1a171ad

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ dynamic = ["version"]
1515
[tool.maturin]
1616
features = ["pyo3/extension-module"]
1717

18-
[tool.uv]
19-
dev-dependencies = [
18+
[dependency-groups]
19+
dev = [
2020
"pytest>=8.3.3",
2121
"pytest-cov>=6.0.0",
2222
"pytest-reportlog>=0.4.0",

src/testrun.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use pyo3::prelude::*;
22
use pyo3::types::PyString;
3-
use pyo3::{PyAny, PyResult};
3+
use pyo3::PyAny;
44
use serde::Serialize;
55

66
use crate::validated_string::ValidatedString;
@@ -57,8 +57,10 @@ impl<'py> IntoPyObject<'py> for Outcome {
5757
}
5858
}
5959

60-
impl<'py> FromPyObject<'py> for Outcome {
61-
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
60+
impl<'py> FromPyObject<'_, 'py> for Outcome {
61+
type Error = PyErr;
62+
63+
fn extract(ob: pyo3::Borrowed<'_, 'py, PyAny>) -> Result<Self, PyErr> {
6264
let s = ob.extract::<&str>()?;
6365
match s {
6466
"pass" => Ok(Outcome::Pass),
@@ -96,8 +98,10 @@ impl<'py> IntoPyObject<'py> for Framework {
9698
}
9799
}
98100

99-
impl<'py> FromPyObject<'py> for Framework {
100-
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
101+
impl<'py> FromPyObject<'_, 'py> for Framework {
102+
type Error = PyErr;
103+
104+
fn extract(ob: pyo3::Borrowed<'_, 'py, PyAny>) -> Result<Self, PyErr> {
101105
let s = ob.extract::<&str>()?;
102106
match s {
103107
"Pytest" => Ok(Framework::Pytest),

0 commit comments

Comments
 (0)