Skip to main content

Build Status PyPI version

mdformat-black

Mdformat plugin to Blacken Python code blocks

Description

mdformat-black is an mdformat plugin that makes mdformat format Python code blocks with Black.

Usage

Install with:

pip install mdformat-black

When using mdformat on the command line, Black formatting will be automatically enabled after install.

When using mdformat Python API, code formatting for Python will have to be enabled explicitly:

import mdformat

unformatted = "```python\n'''black converts quotes'''\n```\n"
formatted = mdformat.text(unformatted, codeformatters={"python"})
assert formatted == '```python\n"""black converts quotes"""\n```\n'

Metadata

Release files for mdformat-black 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdformat-black 0.1.1
File Size Uploaded
mdformat-black-0.1.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mdformat-black 0.1.1
File Interpreter ABI Platform
mdformat_black-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / mdformat-black-0.1.1.tar.gz

Download URL mdformat-black-0.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
57cad92aee314b87dee52a795cdb52469ab166589d2771e3ad3dd19db907ab62
BLAKE2b-256 checksum
How to use checksums
e7342add7968b8570efcf1be6d456ba18919725c4c31fd105e589dae1808c135
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.0 Linux/5.4.0-47-generic

Release files / mdformat_black-0.1.1-py3-none-any.whl

Download URL mdformat_black-0.1.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92a7f83779428ca04e939fcbd196ef6340bf9c83f33b2c50d4d3bb734a63d7b2
BLAKE2b-256 checksum
How to use checksums
f294ce9138b0dfb2026d188b1edd18bd5fd328ff91e2b76002622da2faad46d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.0 Linux/5.4.0-47-generic

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page