-
Notifications
You must be signed in to change notification settings - Fork 796
Updating tooling for jupytext + black break
#1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
blacktoblack-jupyterin pre-commit configuration for better notebook support - Added temporary workaround by downpinning
blackto version <25.11.0 in the jupytext hook due to upstream issue - Enabled new linting rules (ASYNC240, B912, DOC102, RUF065) and added corresponding
noqacomments 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.
5b3b7ca to
87ace4b
Compare
This PR updates tooling to work around mwouts/jupytext#1467
It also starts using
black-jupyterto runblackon 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.
black-jupyter; pinblack<25.11.0forjupytext; updatejupytextandmarkdown-toc-creatorhooks.ASYNC240,B912,DOC102,RUF065); update Pylint disables and per-file ignores; addPLC2701ignore for tests; add# noqa: ASYNC240in code.[tool.markdown_toc_creator]inpyproject.toml.README.md: Add visible Table of Contents section with horizontal rules.docs/tutorials/running_on_lfrqa.ipynb: Minor formatting/signature tweaks.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/test_paperqa.py: Remove inline# noqanow covered by config.Written by Cursor Bugbot for commit 401a87e. Configure here.