Skip to content

Commit 93069eb

Browse files
Vladislav YashkovVladislav Yashkov
authored andcommitted
WIP# 4
1 parent d20ffa6 commit 93069eb

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

python/tests/test_connection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
ConnectionExecuteError,
1010
TransactionExecuteError,
1111
)
12-
from tests.helpers import count_rows_in_test_table
1312

1413
from tests.helpers import count_rows_in_test_table
1514

python/tests/test_cursor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ async def test_cursor_as_async_manager(
168168
querystring=f"SELECT * FROM {table_name}",
169169
fetch_number=fetch_number,
170170
) as cursor:
171-
async for result in cursor:
172-
all_results.append(result)
171+
all_results.extend([result async for result in cursor])
173172

174173
assert len(all_results) == expected_num_results
175174

python/tests/test_transaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
TransactionExecuteError,
1717
TransactionSavepointError,
1818
)
19-
from tests.helpers import count_rows_in_test_table
2019

2120
from tests.helpers import count_rows_in_test_table
2221

src/driver/cursor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
};
1414

1515
/// Additional implementation for the `Object` type.
16-
#[allow(clippy::ref_option)]
16+
#[allow(clippy::ref_option_ref)]
1717
trait CursorObjectTrait {
1818
async fn cursor_start(
1919
&self,
@@ -34,7 +34,7 @@ impl CursorObjectTrait for Object {
3434
///
3535
/// # Errors
3636
/// May return Err Result if cannot execute querystring.
37-
#[allow(clippy::ref_option)]
37+
#[allow(clippy::ref_option_ref)]
3838
async fn cursor_start(
3939
&self,
4040
cursor_name: &str,

src/query_result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{exceptions::rust_errors::RustPSQLDriverPyResult, value_converter::po
1010
/// May return Err Result if can not convert
1111
/// postgres type to python or set new key-value pair
1212
/// in python dict.
13-
#[allow(clippy::ref_option)]
13+
#[allow(clippy::ref_option_ref)]
1414
fn row_to_dict<'a>(
1515
py: Python<'a>,
1616
postgres_row: &'a Row,

0 commit comments

Comments
 (0)