Skip to content

Commit 3f349dd

Browse files
committed
updates
1 parent ab33e66 commit 3f349dd

8 files changed

Lines changed: 17 additions & 15 deletions

File tree

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v4
21-
- name: Set up Python 3.8
21+
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.8
24+
python-version: "3.10"
2525
- uses: pre-commit/action@v3.0.1
2626

2727
tests:
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version: ['pypy-3.8', '3.8', '3.9', '3.10', '3.11', '3.12']
33+
python-version: ['pypy-3.10', '3.10', '3.11', '3.12', '3.13']
3434

3535
steps:
3636
- uses: actions/checkout@v4
@@ -75,7 +75,7 @@ jobs:
7575
- name: Set up Python
7676
uses: actions/setup-python@v5
7777
with:
78-
python-version: "3.8"
78+
python-version: "3.10"
7979
- name: install flit
8080
run: |
8181
pip install flit~=3.4

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ exclude: >
1212
repos:
1313

1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.6.0
15+
rev: v6.0.0
1616
hooks:
1717
- id: check-json
1818
- id: check-yaml
1919
- id: end-of-file-fixer
2020
- id: trailing-whitespace
2121

2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: v0.4.4
23+
rev: v0.12.8
2424
hooks:
2525
- id: ruff
2626
args: [--fix]
2727
- id: ruff-format
2828

2929
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v1.10.0
30+
rev: v1.17.1
3131
hooks:
3232
- id: mypy
3333
additional_dependencies: [markdown-it-py~=3.0]

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.5.0 - 2025-08-11
4+
5+
Drop Python 3.9, which is EoL next month <https://devguide.python.org/versions> and allow for the, soon to be released, markdown-it-py v4.
6+
37
## 0.4.2 - 2024-09-09
48

59
- 👌 Improve parsing of nested amsmath

mdit_py_plugins/dollarmath/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def is_escaped(state: StateInline, back_pos: int, mod: int = 0) -> bool:
147147
return False
148148

149149
# if an odd number of \ then ignore
150-
if (backslashes % 2) != mod:
150+
if (backslashes % 2) != mod: # noqa: SIM103
151151
return True
152152

153153
return False

mdit_py_plugins/field_list/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from collections.abc import Iterator
44
from contextlib import contextmanager
5-
from typing import Optional, Tuple
65

76
from markdown_it import MarkdownIt
87
from markdown_it.rules_block import StateBlock

mdit_py_plugins/texmath/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _func(state: StateBlock, begLine: int, endLine: int, silent: bool) -> bool:
154154
def dollar_pre(src: str, beg: int) -> bool:
155155
prv = charCodeAt(src[beg - 1], 0) if beg > 0 else False
156156
return (
157-
(not prv) or prv != 0x5C and (prv < 0x30 or prv > 0x39) # no backslash,
157+
(not prv) or (prv != 0x5C and (prv < 0x30 or prv > 0x39)) # no backslash,
158158
) # no decimal digit .. before opening '$'
159159

160160

mdit_py_plugins/wordcount/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections.abc import Callable
22
import string
3-
from typing import List
43

54
from markdown_it import MarkdownIt
65
from markdown_it.rules_core import StateCore
@@ -54,6 +53,6 @@ def _word_count_rule(state: StateCore) -> None:
5453
data["text"] += text
5554
data.setdefault("words", 0)
5655
data["words"] += words
57-
data["minutes"] = int(round(data["words"] / per_minute))
56+
data["minutes"] = int(round(data["words"] / per_minute)) # noqa: RUF046
5857

5958
md.core.ruler.push("wordcount", _word_count_rule)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
# then run `tox` or `tox -- {pytest args}`
55
# run in parallel using `tox -p`
66
[tox]
7-
envlist = py38
7+
envlist = py310
88

99
[testenv]
1010
usedevelop = true
1111

12-
[testenv:py{38,39,310,311,312}]
12+
[testenv:py{310,311,312,313}]
1313
extras = testing
1414
commands = pytest {posargs}
1515

1616
[testenv:docs-{update,clean}]
1717
extras = rtd
18-
whitelist_externals = rm
18+
allowlist_externals = rm
1919
commands =
2020
clean: rm -rf docs/_build
2121
sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html}

0 commit comments

Comments
 (0)