{"id":16728752,"url":"https://github.com/hukkin/mdformat-black","last_synced_at":"2025-06-14T10:33:58.474Z","repository":{"id":39887329,"uuid":"296189741","full_name":"hukkin/mdformat-black","owner":"hukkin","description":"Mdformat plugin to Blacken Python code blocks","archived":false,"fork":false,"pushed_at":"2025-03-09T06:30:44.000Z","size":54,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T00:14:30.706Z","etag":null,"topics":["black","commonmark","markdown","mdformat","pyfmt","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hukkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-17T01:44:35.000Z","updated_at":"2025-06-05T20:55:42.000Z","dependencies_parsed_at":"2024-10-28T11:34:38.936Z","dependency_job_id":"d1acc540-4aef-4432-9e7c-879276686c95","html_url":"https://github.com/hukkin/mdformat-black","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":"0.19999999999999996","last_synced_commit":"5448af1e67d200f8861c8e04ec11726b6ec0e91c"},"previous_names":["hukkinj1/mdformat-black"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hukkin/mdformat-black","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukkin%2Fmdformat-black","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukkin%2Fmdformat-black/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukkin%2Fmdformat-black/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukkin%2Fmdformat-black/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hukkin","download_url":"https://codeload.github.com/hukkin/mdformat-black/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukkin%2Fmdformat-black/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259802578,"owners_count":22913659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["black","commonmark","markdown","mdformat","pyfmt","python"],"created_at":"2024-10-12T23:11:34.957Z","updated_at":"2025-06-14T10:33:58.450Z","avatar_url":"https://github.com/hukkin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/hukkin/mdformat-black/actions/workflows/tests.yaml/badge.svg?branch=master)](\u003chttps://github.com/hukkin/mdformat-black/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush\u003e)\n[![PyPI version](https://badge.fury.io/py/mdformat-black.svg)](\u003chttps://badge.fury.io/py/mdformat-black\u003e)\n\n# mdformat-black\n\u003e Mdformat plugin to Blacken Python code blocks\n\n## Description\nmdformat-black is an [mdformat](https://github.com/executablebooks/mdformat) plugin\nthat makes mdformat format Python code blocks with [Black](https://github.com/psf/black).\n## Usage\nInstall with:\n```bash\npip install mdformat-black\n```\nYou may pin Black dependency for formatting stability:\n```bash\npip install mdformat-black black==22.1.0\n```\n\nWhen using mdformat on the command line, Black formatting will be automatically enabled after install.\n\nWhen using mdformat Python API, code formatting for Python will have to be enabled explicitly:\n````python\nimport mdformat\n\nunformatted = \"```python\\n'''black converts quotes'''\\n```\\n\"\nformatted = mdformat.text(unformatted, codeformatters={\"python\"})\nassert formatted == '```python\\n\"\"\"black converts quotes\"\"\"\\n```\\n'\n````\n\n## Usage as a [pre-commit](https://pre-commit.com) hook\n\nAdd the following to your `.pre-commit-config.yaml`:\n```yaml\n- repo: https://github.com/executablebooks/mdformat\n  rev: 0.7.13  # Use the ref you want to point at\n  hooks:\n    - id: mdformat\n      additional_dependencies:\n        - mdformat-black\n        - black==22.1.0  # Pinning black here is optional\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhukkin%2Fmdformat-black","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhukkin%2Fmdformat-black","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhukkin%2Fmdformat-black/lists"}