-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
#451 introduced the --exclude option to specify which files to exclude from formatting using globs. This is an essential feature for anyone that uses things like submodules, vendors 3rd party libs, or uses in-project virtual environments, which includes e.g. every uv user.
However, this can only be used on python >= 3.13. Attempting to do so on other Python versions will result in a error, and will prevent using mdformat altogether.
In practice, many projects support multiple python versions, and for reasons of compatibility use the lowest supported version for development and testing, and can therefore not use --exclude.
Proposal
Make --exclude available on python<3.13 as well. Something like glob.translate could be used for this.
tin-ot, hoel-bagard-hy and sebpretzer
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request