Skip to main content

lintquarto

Project info: Code licence DOI ORCID All Contributors pyOpenSci Peer-Reviewed
Installation: PyPI Anaconda-Server Badge
Metrics: PyPI downloads PyPI downloads PyPI downloads Conda Downloads GitHub Repo stars GitHub forks GitHub last commit GitHub Release Date
Build & quality status: Project Status: Active – The project has reached a stable, usable state and is being actively developed. codecov Tests Docs Lint Code style: Ruff
Supported platforms: Python 3.10|3.11|3.12|3.13 OS

Package for running linters, formatters, static type checkers and code analysis tools on python code in quarto (.qmd) files.

By default, python code validation tools can't check embedded python code in Quarto files. This package fills that gap, enabling analysts and researchers to run python quality checks within Quarto documents.

Currently supported:

Click to view docs

This package is featured on awesome-quarto.

This package has been reviewed by PyOpenSci.

Linting illustration


Installation

You can install lintquarto with pip (from PyPI or GitHub) or conda (from conda-forge).

Install with pip

pip install lintquarto

To include your selection of linters, install them as needed.

For a one-step installation that includes lintquarto and all supported tools, use:

pip install lintquarto[all]

Install with uv

uv add lintquarto

Or to include all supported tools:

uv add "lintquarto[all]"

Install with conda

conda install conda-forge::lintquarto

With conda, only the main lintquarto tool is installed. If you want to use any linters or type checkers, you must install them separately (either with conda or pip, depending on availability).

Development version

To install the latest development version of lintquarto directly from this repository:

pip install git+https://github.com/lintquarto/lintquarto

If you also want all supported code quality tools in one step, install from a local clone in editable mode with the all extra:

git clone https://github.com/lintquarto/lintquarto.git
cd lintquarto
pip install -e ".[all]"

Getting started using lintquarto

Usage

Usage:

lintquarto [-h] [-l LINTER [LINTER ...]] [-f FORMATTER [FORMATTER ...]] [-p PATHS [PATHS ...]] [-e [[exclude_paths] ...]] [-n] [-v] [-k] [-c COMMAND] {list} ...

Lint Python code in Quarto (.qmd) files. Configuration can also be provided in pyproject.toml under [tool.lintquarto]. CLI arguments override configuration file.

Options:

  • -h, --help - show this help message and exit
  • -l, --linters LINTER [LINTER ...] - Linters to run. Valid options: ['basedpyright', 'flake8', 'mypy', 'pycodestyle', 'pydoclint', 'pyflakes', 'pylint', 'pyright', 'pyrefly', 'pytype', 'radon-cc', 'radon-mi', 'radon-raw', 'radon-hal', 'ruff', 'vulture']
  • -f, --formatters FORMATTER [FORMATTER ...] - Formatter to run. Valid options: ['ruff-format', 'ruff-check-fix'].
  • -p, --paths PATHS [PATHS ...] - Quarto files and/or directories to run tools on.
  • -e, --exclude [[exclude_paths] ...] - Files and/or directories to exclude from running tools on.
  • -n, --lint-non-exec - Also lint non-executable Python code chunks
  • -v, --verbose - Verbose output.
  • -k, --keep-temp - Keep temporary .py files after linting.
  • -c, --custom-commands COMMAND - Custom command to run against the generated .py file. Repeat for multiple commands. Example: --custom- commands "mytool"

Commands:

  • list - List supported linters and whether they are available.

Passing extra arguments directly to linters is not supported. Only .qmd files are processed.

Configuration file

As an alternative to passing flags on every run, you can declare your settings once in a [tool.lintquarto] section in your pyproject.toml. The arguments are equivalent to those used on the command line. For example:

[tool.lintquarto]
linters = [
  "ruff",
  "pycodestyle",
]
paths = [
  "examples/",
  "dashboard/index.qmd",
]
lint-non-exec = false

With this in place, you can run lintquarto with no arguments.

Note: CLI flags will always take priority over pyproject.toml. If you supply -l or -p on the command line, those values are used and the corresponding config file values are ignored. exclude and custom-commands are additive - values from both sources are merged together.

Examples

The linter used is interchangeable in these examples.

Lint all .qmd files in the current directory (using pylint):

lintquarto -l pylint -p .

Lint several specific files (using pylint and flake8):

lintquarto -l pylint flake8 -p file1.qmd file2.qmd

Keep temporary .py files after linting (with pylint)

lintquarto -l pylint -p . -k

Lint all files in current directory (using ruff):

  • Excluding folders examples/ and ignore/, or-
  • Excluding a specific file analysis/test.qmd.
lintquarto -l ruff -p . -e examples ignore
lintquarto -l ruff -p . -e analysis/test.qmd

Find out more

Visit our website to find out more and see examples from running with each code validation tool.

Click to view docs


Community

Thanks goes to these wonderful people (emoji key):

Amy Heather
Amy Heather

🎨 📖 🤔 🚇 🚧 ⚠️ 🐛 💻
Isabel Zimmerman
Isabel Zimmerman

🤔 📖
Jacob Cumming
Jacob Cumming

🐛 📖 🤔 ⚠️ 💻
Jonny Saunders
Jonny Saunders

🐛 💻 🤔
Sammi Rosser
Sammi Rosser

💻 📖 ⚠️
Anna Laws
Anna Laws

📖
Nissim Lebovits
Nissim Lebovits

🤔
Tom Monks
Tom Monks

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Curious about contributing? Check out the contributing guidelines to learn how you can help. Every bit of help counts, and your contribution - no matter how minor - is highly valued.


How to cite lintquarto

Please cite the repository on GitHub, PyPI, conda and/or Zenodo:

Heather, A. (2026). lintquarto (v0.14.0). https://github.com/lintquarto/lintquarto.

Heather, A. (2026). lintquarto (v0.14.0). https://pypi.org/project/lintquarto/.

Heather, A. (2026). lintquarto (v0.14.0). https://anaconda.org/conda-forge/lintquarto.

Heather, A. (2026). lintquarto (v0.14.0). https://doi.org/10.5281/zenodo.15731161.

Citation instructions are also provided in CITATION.cff.


Acknowledgements

This project was written and maintained by hand, with occasional use of Perplexity AI during development (specific models and versions varied over time).

AI assistance was used for small, targeted tasks (e.g. help when troubleshooting, identifying issues, refining docstrings, improving code structure), rather than to generate complete functions or substantial content.

All code and design decisions were reviewed and finalised by a human. For transparency, the use of AI is acknowledged, but the project should not be considered AI‑generated.

Metadata

Release files for lintquarto 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lintquarto 0.14.0
File Size Uploaded
lintquarto-0.14.0.tar.gz 36.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lintquarto 0.14.0
File Interpreter ABI Platform
lintquarto-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 75.5 kB

Release files / lintquarto-0.14.0.tar.gz

Download URL lintquarto-0.14.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3d54927e5bb06f4a7547180b0ff045cf7ba198b49ac406d122a7a30dc43ba4c4
BLAKE2b-256 checksum
How to use checksums
255f1d67be4ea46774d0881e20eb8e01ae16ec4e83e1ff0c59f828c26c475630
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release files / lintquarto-0.14.0-py3-none-any.whl

Download URL lintquarto-0.14.0-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
342d4fef37afeb8138700d0c429a0406f3143ef3420157ec810a669ff571995e
BLAKE2b-256 checksum
How to use checksums
cb7a1cd4a854d3be4410b31efab5303e726d2daa1861094461f44a1f646132ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page