asottile / setup-cfg-fmt

apply a consistent format to `setup.cfg` files
MIT License
153 stars 18 forks source link

`variant=CommonMark` gets stripped from `long_description_content_type` #122

Closed Jackenmen closed 2 years ago

Jackenmen commented 2 years ago

Minimal example:

text


`setup.cfg` gets rewritten to:
```ini
[metadata]
name = example_project
long_description = file: README.md
long_description_content_type = text/markdown

This spec can be found here: https://packaging.python.org/en/latest/specifications/core-metadata/#description-content-type

asottile commented 2 years ago

setup-cfg-fmt unconditionally assigns that value based on the detected content type of the readme file: https://github.com/asottile/setup-cfg-fmt/blob/d3e358c2db3d8e480b207a098ade06ee2381e3f5/setup_cfg_fmt.py#L374-L380