Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.15.0
hooks:
- id: mypy
files: ^arangoasync/
Expand Down
2 changes: 1 addition & 1 deletion arangoasync/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _validate(self) -> None:
"verify_iat": True,
"verify_exp": True,
"verify_signature": False,
},
}, # type: ignore[arg-type]
)

self._token_exp = jwt_payload["exp"]
10 changes: 7 additions & 3 deletions arangoasync/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ async def get_many(
documents: Sequence[str | T],
allow_dirty_read: Optional[bool] = None,
ignore_revs: Optional[bool] = None,
) -> Result[V]:
) -> Result[Jsons]:
"""Return multiple documents ignoring any missing ones.

Args:
Expand Down Expand Up @@ -977,10 +977,14 @@ async def get_many(
data=self._doc_serializer.dumps(documents),
)

def response_handler(resp: Response) -> V:
def response_handler(resp: Response) -> Jsons:
if not resp.is_success:
raise DocumentGetError(resp, request)
return self._doc_deserializer.loads_many(resp.raw_body)
return [
doc
for doc in self.deserializer.loads_many(resp.raw_body)
if "_id" in doc
]

return await self._executor.execute(request, response_handler)

Expand Down
2 changes: 1 addition & 1 deletion arangoasync/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.6"
__version__ = "1.1.0"
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [
"packaging>=23.1",
"aiohttp>=3.9",
"multidict>=6.0",
"pyjwt>=2.8.0",
"pyjwt>=2.10.0",
]

[tool.setuptools.dynamic]
Expand All @@ -51,8 +51,8 @@ dev = [
"aiofiles>=24.1.0",
"black==26.1.0",
"flake8==7.3.0",
"isort>=5.10",
"mypy>=1.10",
"isort>=5.10.1",
"mypy==1.15.0",
"pre-commit>=3.7",
"pytest>=8.2",
"pytest-asyncio>=0.23.8",
Expand Down Expand Up @@ -92,5 +92,6 @@ profile = "black"
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = false
ignore_missing_imports = true
strict = true
7 changes: 3 additions & 4 deletions tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ async def test_document_get_many(doc_col, bad_col, docs):
keys = [doc["_key"] for doc in docs]
keys.append("invalid_key")
many = await doc_col.get_many(keys)
assert len(many) == len(keys)
assert "error" in many[-1]
assert len(many) == len(keys) - 1
assert "error" not in many[-1]

# Test with full documents
many = await doc_col.get_many(docs)
Expand All @@ -237,8 +237,7 @@ async def test_document_get_many(doc_col, bad_col, docs):
assert len(many) == 1
assert "error" not in many[0]
many = await doc_col.get_many([bad_rev[0]], ignore_revs=False)
assert len(many) == 1
assert "error" in many[0]
assert len(many) == 0

# Empty list
many = await doc_col.get_many([])
Expand Down
Loading