Skip to content

Commit 11ef597

Browse files
committed
revert
1 parent 0dc3e4f commit 11ef597

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: src/test/test_request.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pyo3::{pyclass, pymethods, types::{PyAnyMethods, PyBytes, PyDict, PyDictMethods, PyList, PyListMethods, PyString}, Bound, PyResult, Python};
1+
use pyo3::{pyclass, pymethods, types::{PyAnyMethods, PyBytes, PyDict, PyDictMethods, PyList, PyListMethods, PyString}, Bound, IntoPyObjectExt, PyObject, PyResult, Python};
22
use teo_result::Error;
33
use std::str::FromStr;
44
use hyper::{header::{HeaderName, HeaderValue}, HeaderMap, Method};
@@ -129,14 +129,14 @@ impl TestRequest {
129129
self.uri = uri;
130130
}
131131

132-
pub fn insert_header(&mut self, key: String, value: String) -> PyResult<&Self> {
132+
pub fn insert_header(&mut self, key: String, value: String, py: Python<'_>) -> PyResult<()> {
133133
self.headers.__setitem__(key, value)?;
134-
Ok(self)
134+
Ok(())
135135
}
136136

137-
pub fn append_header(&mut self, key: String, value: String) -> PyResult<&Self> {
137+
pub fn append_header(&mut self, key: String, value: String, py: Python<'_>) -> PyResult<()> {
138138
self.headers.append(key, value)?;
139-
Ok(self)
139+
Ok(())
140140
}
141141

142142
#[getter]

Diff for: teo/__init__.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1422,13 +1422,13 @@ class TestRequest:
14221422
"""
14231423
...
14241424

1425-
def insert_header(self, key: str, value: str) -> TestRequest:
1425+
def insert_header(self, key: str, value: str) -> None:
14261426
"""
14271427
Insert a header to the request.
14281428
"""
14291429
...
14301430

1431-
def append_header(self, key: str, value: str) -> TestRequest:
1431+
def append_header(self, key: str, value: str) -> None:
14321432
"""
14331433
Append a header to the request.
14341434
"""

0 commit comments

Comments
 (0)