Skip to content

Commit 3202c46

Browse files
authored
Cleanup (#982)
1 parent 9a2a20a commit 3202c46

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

src/neo4j/_async/driver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,8 +1193,6 @@ async def _work(
11931193
transformer: t.Callable[[AsyncResult], t.Awaitable[_T]]
11941194
) -> _T:
11951195
res = await tx.run(query, parameters)
1196-
if transformer is AsyncResult.to_eager_result:
1197-
return await transformer(res)
11981196
return await transformer(res)
11991197

12001198

src/neo4j/_async/io/_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def get_auth(self):
112112

113113
async def _acquire_from_pool(self, address):
114114
with self.lock:
115-
for connection in list(self.connections.get(address, [])):
115+
for connection in self.connections[address]:
116116
if connection.in_use:
117117
continue
118118
connection.pool = self

src/neo4j/_sync/driver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,6 @@ def _work(
11921192
transformer: t.Callable[[Result], t.Union[_T]]
11931193
) -> _T:
11941194
res = tx.run(query, parameters)
1195-
if transformer is Result.to_eager_result:
1196-
return transformer(res)
11971195
return transformer(res)
11981196

11991197

src/neo4j/_sync/io/_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_auth(self):
109109

110110
def _acquire_from_pool(self, address):
111111
with self.lock:
112-
for connection in list(self.connections.get(address, [])):
112+
for connection in self.connections[address]:
113113
if connection.in_use:
114114
continue
115115
connection.pool = self

tests/unit/common/codec/packstream/v1/test_packstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def test_map_key_type(self, packer_with_buffer, map_, exc_type):
548548
# maps must have string keys
549549
packer, packable_buffer = packer_with_buffer
550550
with pytest.raises(exc_type, match="strings"):
551-
packer._py_pack(map_)
551+
packer._pack(map_)
552552

553553
def test_illegal_signature(self, assert_packable):
554554
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)