Skip to main content

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

Project description

lintquarto

Project info: Code licence DOI ORCID

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. Coverage Tests Docs Lint

Supported platforms: Python 3.7|3.8|3.9|3.10|3.11|3.12|3.13 OS


Package for running linters, 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

Linting illustration


Installation

You can install lintquarto with pip (from PyPI) 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 linters and type checkers, use:

pip install 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).


Getting started using lintquarto

Usage

Usage:

lintquarto -l LINTER [LINTER ...] -p PATH [PATH ...] [-e EXCLUDE [EXCLUDE ...]] [-k]

Options:

  • -l, --linters LINTER [LINTER ...] - linters to run.
  • -p, --paths PATH [PATH ...] - quarto files and/or directories to include.
  • -e, --exclude EXCLUDE [EXCLUDE ...] - optional, files and/or directories to exclude.
  • -k, --keep-temp - optional, keep temporary .py files created during linting (for debugging).

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

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

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. (2025). lintquarto (v0.7.0). https://github.com/lintquarto/lintquarto.

Heather, A. (2025). lintquarto (v0.7.0). https://pypi.org/project/lintquarto/.

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

Heather, A. (2025). lintquarto (v0.7.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 during development. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lintquarto-0.7.0.tar.gz (663.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lintquarto-0.7.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file lintquarto-0.7.0.tar.gz.

File metadata

  • Download URL: lintquarto-0.7.0.tar.gz
  • Upload date:
  • Size: 663.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for lintquarto-0.7.0.tar.gz
Algorithm Hash digest
SHA256 fda917c6eb1d1fd456962a53fbd6eb6b85e34e46a1a21c4dabe04db2ddda8ed1
MD5 ba50eb219d7c7c0da1d9dc1b96cec1dd
BLAKE2b-256 baa2f30fd757b236c010e4f18bab07ada85dd143a5bb491e9f40d08b2ec6ee6f

See more details on using hashes here.

File details

Details for the file lintquarto-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: lintquarto-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for lintquarto-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfddd3b8f26624b09d0fccb04a7f477c828125b29ad77d61a7650f2198556b9c
MD5 3d3fdf1da17842377a238b7cc421af7a
BLAKE2b-256 0b53b9cdb5b69588b127228e66f633affe6df27b51107e3b025f613a081687eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page