Skip to main content

Package for running linters and static type checkers on quarto .qmd files.

Project description

lintquarto

Code licence ORCID PyPI DOI Coverage


Package for running linters and static type checkers on quarto .qmd files.

Currently supported linters: pylint, flake8, pyflakes, ruff, vulture, radon, and pycodestyle.

It also supports some static type checkers: mypy, pyright, pyrefly, and pytype.

Code licence

Linting illustration


Installation

You can install lintquarto from PyPI:

pip install lintquarto

To also install all supported linters:

pip install lintquarto[all]

Getting started using lintquarto

Usage

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

  • -l --linters LINTER [LINTER ...] - Linters to run. Valid options: pylint, flake8, pyflakes, ruff, vulture, radon, pycodestyle, mypy, pyright, pyrefly, or pytype.
  • -p --paths PATH [PATH ...]- Quarto files and/or directories to lint.
  • -e --exclude EXCLUDE [EXCLUDE ...] - Files and/or directories to exclude from linting.
  • -k, --keep-temp - Keep the temporary .py files created during linting (for debugging).

Only one linter can be specified per command. 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

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 and/or Zenodo:

Heather, A. (2025). lintquarto (v0.3.0). https://github.com/lintquarto/lintquarto.

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

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

Citation instructions are also provided in CITATION.cff.


Acknowledgements

Parts of this package were generated or adapted from code provided by Perplexity.

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.3.0.tar.gz (650.5 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.3.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lintquarto-0.3.0.tar.gz
Algorithm Hash digest
SHA256 10c47aa51e206306ce5df18b95261ca6edb525774f7592d5a4ee4a695e9b76e2
MD5 ec19a6c30a86f559b21909d7c92fd892
BLAKE2b-256 796b50aec0846ab326bc5997af5a62b37bd113995c0ab5ecaf65cefcaeeee044

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lintquarto-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3a3dbcdf2e62fa3935f22fe94bfd1bf7137ad37fcdf3a8cf8e5cea7fda79f3b
MD5 44efec8214f74115d5edf57aac5b74a4
BLAKE2b-256 340546f21d455235f0694b3191e285a386b3ae1688e97ab04f426459b471a8ab

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