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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
rev: v0.13.2
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.1.0
rev: 25.9.0
hooks:
- id: black
- repo: https://github.com/rbubley/mirrors-prettier
Expand All @@ -48,19 +48,19 @@ repos:
- id: codespell
additional_dependencies: [".[toml]"]
- repo: https://github.com/crate-ci/typos
rev: v1.32.0
rev: v1.36.3
hooks:
- id: typos
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2025.09.11
rev: 2025.09.26
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.17
rev: 0.8.22
hooks:
- id: uv-lock
- repo: https://github.com/adamchainz/blacken-docs
Expand Down
6 changes: 2 additions & 4 deletions src/paperqa/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,8 @@ async def query(self, **kwargs) -> DocDetails | None:
doc_details = (
sum(
p
for p in (
await gather_with_concurrency(
len(task.providers), task.provider_queries(query_args)
)
for p in await gather_with_concurrency(
len(task.providers), task.provider_queries(query_args)
)
if p
)
Expand Down
2 changes: 1 addition & 1 deletion src/paperqa/clients/openalex.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def parse_openalex_to_doc_details(message: dict[str, Any]) -> DocDetails:
"""
raw_author_names = [
authorship.get("raw_author_name", "")
for authorship in (message.get("authorships") or []) # Handle None authorships
for authorship in message.get("authorships") or [] # Handle None authorships
if authorship
]
sanitized_authors = [
Expand Down
2 changes: 1 addition & 1 deletion src/paperqa/clients/unpaywall.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _create_doc_details(self, data: UnpaywallResponse) -> DocDetails:
license = data.best_oa_location.license # noqa: A001
return DocDetails(
authors=[
f"{author.given} {author.family}" for author in (data.z_authors or [])
f"{author.given} {author.family}" for author in data.z_authors or []
],
publication_date=(
None
Expand Down
4 changes: 2 additions & 2 deletions src/paperqa/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,8 @@ def __add__(self, other: DocDetails | int) -> DocDetails: # noqa: PLR0912
best_authors = (
self.authors
if (
sum(len(a) for a in (self.authors or []))
>= sum(len(a) for a in (other.authors or []))
sum(len(a) for a in self.authors or [])
>= sum(len(a) for a in other.authors or [])
)
else other.authors
)
Expand Down
5,248 changes: 2,610 additions & 2,638 deletions tests/cassettes/test_get_reasoning[deepseek-reasoner].yaml

Large diffs are not rendered by default.

5,430 changes: 2,704 additions & 2,726 deletions tests/cassettes/test_get_reasoning[openrouter-deepseek].yaml

Large diffs are not rendered by default.

5,239 changes: 2,600 additions & 2,639 deletions tests/cassettes/test_pdf_reader_match_doc_details.yaml

Large diffs are not rendered by default.

Loading