You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
The text was updated successfully, but these errors were encountered:
Not sure if it works for you, but using a tool like pre-commit will allow excluding files on older Python versions (and comes with other benefits too).
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. everyuv
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 usingmdformat
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 onpython<3.13
as well. Something likeglob.translate
could be used for this.The text was updated successfully, but these errors were encountered: