Skip to content

Conversation

@jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza commented Nov 10, 2025

This PR updates tooling to work around mwouts/jupytext#1467

It also starts using black-jupyter to run black on our notebooks.


Note

Updates tooling (pre-commit, ruff/pylint) to support jupytext+black, adds black-jupyter and markdown TOC, and tweaks code to satisfy new lint rules.

  • Tooling:
    • Pre-commit: Bump multiple hooks; switch to black-jupyter; pin black<25.11.0 for jupytext; update jupytext and markdown-toc-creator hooks.
    • Linting: Extend Ruff rules (e.g., ASYNC240, B912, DOC102, RUF065); update Pylint disables and per-file ignores; add PLC2701 ignore for tests; add # noqa: ASYNC240 in code.
    • Config: Add [tool.markdown_toc_creator] in pyproject.toml.
  • Docs:
    • README.md: Add visible Table of Contents section with horizontal rules.
    • docs/tutorials/running_on_lfrqa.ipynb: Minor formatting/signature tweaks.
  • Code:
    • src/paperqa/agents/search.py: Adjust path construction and formatting for lint compliance.
    • src/paperqa/clients/crossref.py, src/paperqa/contrib/openreview_paper_helper.py: Minor lint-related changes.
  • Tests:
    • tests/test_paperqa.py: Remove inline # noqa now covered by config.

Written by Cursor Bugbot for commit 401a87e. Configure here.

@jamesbraza jamesbraza self-assigned this Nov 10, 2025
Copilot AI review requested due to automatic review settings November 10, 2025 21:14
@jamesbraza jamesbraza added the bug Something isn't working label Nov 10, 2025
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 10, 2025
@dosubot
Copy link

dosubot bot commented Nov 10, 2025

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the enhancement New feature or request label Nov 10, 2025
Copilot finished reviewing on behalf of jamesbraza November 10, 2025 21:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the project's tooling configuration to work around a compatibility issue between jupytext and black version 25.11.0. The main changes include switching to black-jupyter for notebook formatting, downpinning black in the jupytext pre-commit hook, and updating various linting rules and tool versions.

Key Changes

  • Switched from black to black-jupyter in pre-commit configuration for better notebook support
  • Added temporary workaround by downpinning black to version <25.11.0 in the jupytext hook due to upstream issue
  • Enabled new linting rules (ASYNC240, B912, DOC102, RUF065) and added corresponding noqa comments where needed

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.pre-commit-config.yaml Updated tool versions and switched to black-jupyter; added black downpin workaround for jupytext
pyproject.toml Added new linting rules, updated pylint configuration, and added markdown-toc-creator settings
tests/test_paperqa.py Removed obsolete PLC2701 noqa comment (now handled by per-file-ignores)
src/paperqa/contrib/openreview_paper_helper.py Added ASYNC240 noqa comments to suppress blocking path operations warnings
src/paperqa/clients/crossref.py Added ASYNC240 noqa comment to suppress blocking path operation warning
src/paperqa/agents/search.py Added ASYNC240 noqa comment to suppress blocking path operation warning
docs/tutorials/running_on_lfrqa.ipynb Reformatted function signatures and removed trailing newlines per black-jupyter
README.md Updated table of contents formatting with horizontal rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesbraza jamesbraza merged commit f65adb0 into main Nov 10, 2025
9 checks passed
@jamesbraza jamesbraza deleted the updating-pre-commit branch November 10, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants