Run Ruff, Mypy, and other code-quality tools on Jupyter notebooks with nbQA
Apply standard Python formatters, linters, and type checkers to notebook-heavy repositories without manually converting notebooks to scripts.
What it does
Run Ruff, Mypy, and other code-quality tools on Jupyter notebooks with nbQA
Apply standard Python formatters, linters, and type checkers to notebook-heavy repositories without manually converting notebooks to scripts.
Prerequisites
Python 3, pip, nbQA, Jupyter notebooks, underlying QA tools such as Ruff or Mypy
Installation
Use the upstream install or setup path that matches your environment:
- $ python -m pip install -U nbqa
- $ python -m pip install -U "nbqa[toolchain]"
Requirements and caveats from upstream:
- In your virtual environment, run (note: the $ is not part of the command):
- Format .md files saved via Jupytext (requires jupytext to be installed):
- See command-line examples for examples involving doctest, flake8, [mypy](...
Basic usage or getting-started notes:
-
Run ruff, isort, pyupgrade, mypy, pylint, flake8, black, blacken-docs, and more on Jupyter Notebooks
-
Here's an example of how to set up some pre-commit hooks: put this in your .pre-commit-config.yaml file (see usage as pre-commit hook)
-
Source: https://github.com/nbQA-dev/nbQA
-
Extracted from upstream docs: https://raw.githubusercontent.com/nbQA-dev/nbQA/HEAD/README.md
Documentation
Source
Capabilities
Install
Quality
deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,731 chars)