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 all .qmd files from a list of files and directories, excluding
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 a unique file path by appending ” (n)” before the file extension
convert_qmd_to_py Convert a Quarto (.qmd) file to Python (.py) file, preserving line

Linters module

Class to check for supported and available Python linters or static type checkers 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 when incorrect