Metadata-Version: 2.4
Name: qmdblack
Version: 0.1.1
Summary: Format Python code blocks in Quarto Markdown (.qmd) files using Black
License: MIT
Keywords: black,formatter,qmd,quarto
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Requires-Dist: black>=24.0
Requires-Dist: click>=8.0
Description-Content-Type: text/markdown

# qmdblack

Format Python code blocks in [Quarto Markdown](https://quarto.org/) (`.qmd`) files using [Black](https://github.com/psf/black).

Quarto cell option directives (`#|` lines) are preserved as-is at the top of each block.

## Installation

```bash
pip install qmdblack
```

## Usage

```bash
# Format files in-place
qmdblack notebook.qmd

# Check without writing (exit 1 if any file would change)
qmdblack --check notebook.qmd

# Show a diff without writing
qmdblack --diff notebook.qmd

# Custom line length (default: 88)
qmdblack -l 100 notebook.qmd

# Multiple files
qmdblack *.qmd
```

## Example

Before:

````markdown
```{python}
#| echo: false
x=1+2
y   =   x*3
print(   y   )
```
````

After:

````markdown
```{python}
#| echo: false
x = 1 + 2
y = x * 3
print(y)
```
````
