Skip to content

Commit 62beb22

Browse files
authored
Merge branch 'master' into check_diff
2 parents df37cd7 + 2e31be5 commit 62beb22

27 files changed

+390
-107
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
commit = True
33
tag = True
44
tag_name = {new_version}
5-
current_version = 0.7.17
5+
current_version = 0.7.18
66

77
[bumpversion:file:pyproject.toml]
88
search = version = "{current_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT

.flake8

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[flake8]
22
max-line-length = 88
33
max-complexity = 10
4-
# These checks violate PEP8 so let's ignore them
5-
extend-ignore = E203
4+
extend-ignore =
5+
# E203: Whitespace before ':' (violates PEP8 and black style)
6+
E203,
7+
# A005: A module is shadowing a Python builtin module
8+
A005,
69
extend-exclude = */site-packages/*

.github/workflows/tests.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v3
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.8'
19+
python-version: '3.11'
2020

2121
- name: Installation (deps and package)
2222
run: |
23-
pip install . pre-commit mypy==0.910 -r tests/requirements.txt
23+
pip install . pre-commit mypy==1.11.2 -r tests/requirements.txt
2424
2525
- name: run linters
2626
run: |
@@ -33,15 +33,15 @@ jobs:
3333
runs-on: ${{ matrix.os }}
3434
strategy:
3535
matrix:
36-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev']
36+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev']
3737
os: [ubuntu-latest, macos-latest, windows-latest]
38-
continue-on-error: ${{ matrix.python-version == '3.12-dev' }}
38+
continue-on-error: ${{ matrix.python-version == '3.14-dev' }}
3939

4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242

4343
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v3
44+
uses: actions/setup-python@v5
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747

@@ -51,11 +51,13 @@ jobs:
5151
5252
- name: Test with pytest
5353
run: |
54-
pytest --cov --cov-fail-under=100
54+
pytest --cov
5555
5656
- name: Report coverage
57-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
58-
uses: codecov/codecov-action@v2
57+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
58+
uses: codecov/codecov-action@v4
59+
with:
60+
token: ${{ secrets.CODECOV_TOKEN }}
5961

6062
allgood:
6163
runs-on: ubuntu-latest
@@ -71,10 +73,10 @@ jobs:
7173
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
7274
runs-on: ubuntu-latest
7375
steps:
74-
- uses: actions/checkout@v3
75-
- uses: actions/setup-python@v3
76+
- uses: actions/checkout@v4
77+
- uses: actions/setup-python@v5
7678
with:
77-
python-version: '3.8'
79+
python-version: '3.x'
7880
- name: Install build and publish tools
7981
run: |
8082
pip install build twine

.pre-commit-config.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
3+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
44
hooks:
55
- id: check-yaml
66
- id: check-toml
@@ -23,22 +23,26 @@ repos:
2323
hooks:
2424
- id: absolufy-imports
2525
- repo: https://github.com/PyCQA/isort
26-
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0
26+
rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2
2727
hooks:
2828
- id: isort
2929
- repo: https://github.com/psf/black
30-
rev: 193ee766ca496871f93621d6b58d57a6564ff81b # frozen: 23.7.0
30+
rev: 1b2427a2b785cc4aac97c19bb4b9a0de063f9547 # frozen: 24.10.0
3131
hooks:
3232
- id: black
33-
- repo: https://github.com/myint/docformatter
34-
rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
33+
- repo: https://github.com/hukkin/docformatter
34+
rev: ab802050e6e96aaaf7f917fcbc333bb74e2e57f7 # frozen: v1.4.2
3535
hooks:
3636
- id: docformatter
3737
- repo: https://github.com/PyCQA/flake8
38-
rev: 10f4af6dbcf93456ba7df762278ae61ba3120dc6 # frozen: 6.1.0
38+
rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1
3939
hooks:
4040
- id: flake8
4141
additional_dependencies:
4242
- flake8-bugbear
4343
- flake8-builtins
4444
- flake8-comprehensions
45+
- repo: https://github.com/pre-commit/pre-commit
46+
rev: cc4a52241565440ce200666799eef70626457488 # frozen: v4.0.1
47+
hooks:
48+
- id: validate_manifest

.readthedocs.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# .readthedocs.yaml
2-
# Read the Docs configuration file
3-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4-
5-
# Required
61
version: 2
72

8-
# Build documentation in the docs/ directory with Sphinx
3+
build:
4+
os: 'ubuntu-lts-latest'
5+
tools:
6+
python: '3.11'
7+
98
sphinx:
109
fail_on_warning: true
1110

12-
# Optionally set the version of Python and requirements required to build your docs
1311
python:
14-
version: '3.8'
1512
install:
1613
- requirements: docs/requirements.txt

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Note that GitHub's Markdown renderer supports syntax extensions not included in
4141
For full GitHub support do:
4242

4343
```bash
44-
pip install mdformat-gfm mdformat-frontmatter mdformat-footnote
44+
pip install mdformat-gfm mdformat-frontmatter mdformat-footnote mdformat-gfm-alerts
4545
```
4646

4747
Install with [Markedly Structured Text (MyST)](https://myst-parser.readthedocs.io/en/latest/using/syntax.html) support:
@@ -90,7 +90,9 @@ If a file is not properly formatted, the exit code will be non-zero.
9090

9191
```console
9292
foo@bar:~$ mdformat --help
93-
usage: mdformat [-h] [--check] [--version] [--number] [--wrap {keep,no,INTEGER}] [--end-of-line {lf,crlf,keep}] [paths ...]
93+
usage: mdformat [-h] [--check] [--version] [--number] [--wrap {keep,no,INTEGER}]
94+
[--end-of-line {lf,crlf,keep}] [--exclude PATTERN]
95+
[paths ...]
9496

9597
CommonMark compliant Markdown formatter
9698

@@ -106,8 +108,11 @@ options:
106108
paragraph word wrap mode (default: keep)
107109
--end-of-line {lf,crlf,keep}
108110
output file line ending mode (default: lf)
111+
--exclude PATTERN exclude files that match the Unix-style glob pattern (multiple allowed)
109112
```
110113

114+
The `--exclude` option is only available on Python 3.13+.
115+
111116
<!-- end cli-usage -->
112117

113118
## Documentation

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = 'Taneli Hukkinen'
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = '0.7.17' # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
26+
release = '0.7.18' # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
2727

2828

2929
# -- General configuration ---------------------------------------------------

docs/contributors/contributing.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ setuptools.setup(
6060
)
6161
```
6262

63-
If using Poetry for packaging, the entry point configuration in `pyproject.toml` would need to be like:
63+
If using a PEP 621 compliant build backend (e.g. Flit) for packaging, the entry point configuration in `pyproject.toml` would need to be like:
6464

6565
```toml
6666
# other config here...
67-
[tool.poetry.plugins."mdformat.codeformatter"]
67+
[project.entry-points."mdformat.codeformatter"]
6868
"python" = "my_package.some_module:format_python"
6969
```
7070

@@ -112,10 +112,17 @@ setuptools.setup(
112112
If using Poetry or Flit for packaging, the entry point configuration in `pyproject.toml` would need to be like:
113113

114114
```toml
115-
# other config here...
115+
# Poetry specific:
116116
[tool.poetry.plugins."mdformat.parser_extension"]
117117
"myextension" = "my_package:ext_module_or_class"
118-
# or
119-
[tool.flit.plugins."mdformat.parser_extension"]
118+
```
119+
120+
```toml
121+
# or PEP 621 compliant (works with Flit):
122+
[project.entry-points."mdformat.parser_extension"]
120123
"myextension" = "my_package:ext_module_or_class"
121124
```
125+
126+
## Making your plugin discoverable
127+
128+
In case you host your plugin on GitHub, make sure to add it under the "mdformat" topic so it shows up on https://github.com/topics/mdformat.

docs/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# List dependencies in a format that readthedocs.org understands.
22

3-
docutils == 0.18.1
4-
sphinx == 5.1.1
5-
myst-parser == 0.18.0
6-
furo == 2022.6.21
3+
docutils == 0.21.2
4+
sphinx == 8.0.2
5+
myst-parser == 4.0.0
6+
furo == 2024.8.6

docs/users/changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
This log documents all Python API or CLI breaking backwards incompatible changes.
44
Note that there is currently no guarantee for a stable Markdown formatting style across versions.
55

6+
## 0.7.18
7+
8+
- Added
9+
- Option to exclude file paths using Unix-style glob patterns
10+
(`--exclude` on the CLI and `exclude` key in TOML).
11+
This feature is Python 3.13+ only.
12+
Thank you, [J. Sebastian Paez](https://github.com/jspaezp), for the issue.
13+
- Removed
14+
- Python 3.8 support
15+
616
## 0.7.17
717

818
- Added

0 commit comments

Comments
 (0)