Reference

Main module

The main CLI logic for linting Python code in Quarto (.qmd) files, including argument parsing, file conversion, linter invocation, and temporary file management.

main Entry point for the lintquarto CLI.
gather_qmd_files Gather .qmd files from listed files/dirs, excluding specified paths.
process_qmd Convert a .qmd file to .py, lint it, and clean up.

Converter module

Functions to convert Quarto (.qmd) files to Python (.py) files, preserving line alignment and extracting Python code, with both a command-line interface and callable functions.

QmdToPyConverter Convert lines from a .qmd file to .py file.
get_unique_filename Generate unique path by adding “_n” before the file extension if needed.
convert_qmd_to_py Convert Quarto file to Python file, preserving line alignment.

Linters module

Class to check for supported and available Python linters, static type checkers or code analysis tools on the user’s system.

Linters Checks if requested linter (or static type checker) is available.

Line length module

Class to detect configured line length.

LineLengthDetector Detect the configured line length for a given Python linter.

Args module

Class which extends argparse.ArgumentParser to provide user-friendly error messages and help text when incorrect command-line arguments are supplied.

CustomArgumentParser Print user-friendly error message and help text.