Skip to content

Commit 65ecec7

Browse files
committed
⬆️ Upgrade dependencies
1 parent 4076d4b commit 65ecec7

9 files changed

Lines changed: 117 additions & 180 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.10', '3.11', '3.12', '3.13']
18-
pandoc-version: [3.6.3]
17+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
18+
pandoc-version: [3.9.0.2]
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v6
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install Hatch
@@ -38,11 +38,11 @@ jobs:
3838
strategy:
3939
matrix:
4040
python-version: ['3.12']
41-
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5', 3.6.3]
41+
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5', 3.6.4, 3.7.0.2, 3.8.3, 3.9.0.2]
4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v6
4444
- name: Set up Python ${{ matrix.python-version }}
45-
uses: actions/setup-python@v5
45+
uses: actions/setup-python@v6
4646
with:
4747
python-version: ${{ matrix.python-version }}
4848
- name: Install Hatch
@@ -63,9 +63,9 @@ jobs:
6363
python-version: ['3.12']
6464
pandoc-version: [3.6.3]
6565
steps:
66-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@v6
6767
- name: Set up Python
68-
uses: actions/setup-python@v5
68+
uses: actions/setup-python@v6
6969
with:
7070
python-version: ${{ matrix.python-version }}
7171
- name: Install Hatch
@@ -87,11 +87,11 @@ jobs:
8787
strategy:
8888
matrix:
8989
python-version: ['3.12']
90-
pandoc-version: [3.6.3]
90+
pandoc-version: [3.9.0.2]
9191
steps:
92-
- uses: actions/checkout@v4
92+
- uses: actions/checkout@v6
9393
- name: Set up Python
94-
uses: actions/setup-python@v5
94+
uses: actions/setup-python@v6
9595
with:
9696
python-version: ${{ matrix.python-version }}
9797
- name: Install Hatch

.github/workflows/python-publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ jobs:
1414
matrix:
1515
python-version: ['3.12']
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818
with:
1919
fetch-depth: 0
2020
- name: Set up Python
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install Hatch
2525
run: |
26-
pipx install hatch
27-
pipx inject --force hatch hatchling==1.25.0
26+
pipx install hatch==1.16.5
2827
- name: Build and publish
2928
env:
3029
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
77

88
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
9-
rev: v2.14.0
9+
rev: v2.16.0
1010
hooks:
1111
- id: pretty-format-toml
1212
args: [--autofix, --no-sort]
1313
- id: pretty-format-yaml
1414
args: [--autofix]
1515

1616
- repo: https://github.com/asottile/pyupgrade
17-
rev: v3.18.0
17+
rev: v3.21.2
1818
hooks:
1919
- id: pyupgrade
2020
args: [--py310-plus]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Install
1818
[![Downloads](https://img.shields.io/pypi/dm/pandoc-numbering?logo=pypi&logoColor=white)](https://pepy.tech/project/pandoc-numbering)
1919
[![Development Status](https://img.shields.io/pypi/status/pandoc-numbering.svg?logo=pypi&logoColor=white)](https://pypi.org/project/pandoc-numbering/)
2020
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-numbering.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-numbering/)
21-
[![Pandoc version](https://img.shields.io/badge/pandoc-2.14%20..%203.6-blue.svg?logo=markdown)](https://pandoc.org/)
21+
[![Pandoc version](https://img.shields.io/badge/pandoc-2.14%20..%203.9-blue.svg?logo=markdown)](https://pandoc.org/)
2222
[![Latest release](https://img.shields.io/github/release-date/chdemko/pandoc-numbering.svg?logo=github)](https://github.com/chdemko/pandoc-numbering/releases)
2323
[![Last commit](https://img.shields.io/github/last-commit/chdemko/pandoc-numbering/develop?logo=github)](https://github.com/chdemko/pandoc-numbering/commit/develop/)
2424
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/pandoc-numbering.svg?logo=github)](http://pandoc-numbering.readthedocs.io/en/latest/)

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# If your documentation needs a minimal Sphinx version, state it here.
2828
#
29-
needs_sphinx = "8.1"
29+
needs_sphinx = "9.1"
3030

3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

pyproject.toml

Lines changed: 16 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dynamic = ["version"]
77
name = "pandoc-numbering"
88
description = "A pandoc filter for automatic numbering"
99
readme = "README.md"
10-
requires-python = ">=3.10,<3.14"
10+
requires-python = ">=3.10,<3.15"
1111
license = {text = "BSD-3-Clause"}
1212
license-files = {paths = ["LICENSE"]}
1313
authors = [{name = "Christophe Demko", email = "chdemko@gmail.com"}]
@@ -35,6 +35,7 @@ classifiers = [
3535
"Programming Language :: Python :: 3.11",
3636
"Programming Language :: Python :: 3.12",
3737
"Programming Language :: Python :: 3.13",
38+
"Programming Language :: Python :: 3.14",
3839
# Natural language used
3940
"Natural Language :: English"
4041
]
@@ -63,45 +64,20 @@ local_scheme = "no-local-version"
6364
packages = ["src/pandoc_numbering"]
6465

6566
[[tool.hatch.envs.hatch-test.matrix]]
66-
python = ["3.10", "3.11", "3.12", "3.13"]
67+
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
6768

6869
[tool.hatch.envs.hatch-static-analysis]
6970
dependencies = [
7071
# Types
7172
"types-PyYAML~=6.0",
7273
# Formatter
73-
"black[jupyter]~=25.1",
74+
"black[jupyter]~=26.3",
7475
# Style checkers
75-
"doc8~=1.1",
76-
"mypy~=1.15",
77-
"flake8~=7.1",
78-
"flake8-pyproject~=1.2",
79-
"flake8-annotations-complexity~=0.0",
80-
"flake8-black~=0.3",
81-
"flake8-blind-except~=0.2",
82-
"flake8-bugbear~=24.10",
83-
"flake8-builtins~=2.5",
84-
"flake8-cognitive-complexity~=0.1",
85-
"flake8-comprehensions~=3.16",
86-
"flake8-docstrings~=1.7",
87-
"flake8-expression-complexity~=0.0",
88-
"flake8-fixme~=1.1",
89-
"flake8-functions~=0.0",
90-
"flake8-import-order~=0.18",
91-
"flake8-mypy~=17.8",
92-
"flake8-pyi~=24.9",
93-
"flake8-pydocstyle~=0.2",
94-
"flake8-return~=1.2",
95-
"flake8-simplify~=0.21",
96-
"flake8-spellcheck~=0.28",
97-
"flake8-use-fstring~=1.4",
98-
"flake8-variables-names~=0.0",
99-
"pep8-naming~=0.14",
100-
"darglint~=1.8.1",
101-
"pydoclint[flake8]~=0.6",
76+
"doc8~=2.0",
77+
"mypy~=1.10",
10278
"teyit~=0.4",
103-
"refurb~=2.0",
104-
"ruff~=0.9"
79+
"refurb~=2.3",
80+
"ruff~=0.15"
10581
]
10682

10783
[tool.hatch.envs.hatch-static-analysis.scripts]
@@ -115,8 +91,7 @@ format-fix = [
11591
lint-check = [
11692
"refurb {args:src docs}",
11793
"ruff check {args:src docs}",
118-
"teyit --show-stats --fail-on-change {args:tests}",
119-
"flake8 {args:src docs}"
94+
"teyit --show-stats --fail-on-change {args:tests}"
12095
]
12196
lint-fix = [
12297
"ruff check --fix {args:src docs}"
@@ -125,7 +100,7 @@ lint-fix = [
125100
[tool.hatch.envs.lint]
126101
dependencies = [
127102
"slotscheck~=0.19",
128-
"pylint~=3.3"
103+
"pylint~=4.0"
129104
]
130105

131106
[tool.hatch.envs.lint.scripts]
@@ -136,9 +111,9 @@ check = [
136111

137112
[tool.hatch.envs.docs]
138113
dependencies = [
139-
"myst-parser~=4.0",
140-
"Sphinx~=8.1",
141-
"sphinx-rtd-theme~=3.0",
114+
"myst-parser~=5.0",
115+
"Sphinx~=9.1",
116+
"sphinx-rtd-theme~=3.1",
142117
"sphinx-copybutton~=0.5"
143118
]
144119

@@ -149,69 +124,14 @@ build = "sphinx-build docs {args:build/sphinx/html}"
149124
consider_namespace_packages = true
150125
pythonpath = ["src"]
151126

127+
[tool.black]
128+
target-version = ["py310", "py311", "py312"]
129+
152130
[tool.ruff]
153131
# Allow lines to be as long as 88.
154132
line-length = 88
155133
target-version = "py310"
156134

157-
[tool.flake8]
158-
# flake8-docstrings
159-
docstring-convention = "numpy"
160-
# darglint
161-
docstring_style = "numpy"
162-
exclude = "*.pyi"
163-
ignore = [
164-
# class attribute is shadowing a Python builtin
165-
"A003",
166-
# Cognitive complexity is too high
167-
"CCR001",
168-
# Function "__init__" has ... arguments that exceeds max allowed 6
169-
"CFQ002",
170-
# Function attributes has length ... that exceeds max allowed length 100
171-
"CFQ001",
172-
# Function ... has ... returns that exceeds max allowed 3
173-
"CFQ004",
174-
# Missing docstring in public method
175-
"D105",
176-
# One-line docstring should fit on one line with quotes
177-
"D200",
178-
# The docstring parameter type doesn't match function.
179-
"DAR103",
180-
# Class docstring contains fewer class attributes than actual class attributes.
181-
"DOC601",
182-
# Class docstring attributes are different from actual class attributes.
183-
"DOC603",
184-
# whitespace before ":"
185-
"E203",
186-
# Expression is too complex
187-
"ECE001",
188-
# undefined name TODO: remove
189-
"F821",
190-
# Multi-line construct missing trailing comma
191-
"S101",
192-
# Spelling error in name (e.g. variable, function, class)
193-
"SC200",
194-
# SIM119 Use a dataclass for "class ..."
195-
"SIM119",
196-
# fixme found (TODO)
197-
"T101",
198-
# Returning Any from function declared to return "..."
199-
"T484",
200-
# Found ... errors in ... file (checked ... source file)
201-
"T499",
202-
# variable names that shadow builtins are not allowed
203-
"VNE003",
204-
# line break before binary operator
205-
"W503"
206-
]
207-
max-line-length = 88
208-
statistics = true
209-
# pydoclint
210-
arg-type-hints-in-docstring = false
211-
212-
[tool.pydoclint]
213-
style = "numpy"
214-
215135
[tool.mypy]
216136
ignore_missing_imports = true
217137
no_implicit_optional = true

src/pandoc_numbering/_main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def to_latex(elem: Element) -> Any:
773773
run_filters([remove_useless_latex], doc=Plain(elem)),
774774
input_format="panflute",
775775
output_format="latex",
776-
extra_args=["--no-highlight"],
776+
extra_args=["--syntax-highlighting=none"],
777777
)
778778

779779

@@ -1533,17 +1533,15 @@ def finalize(doc: Doc):
15331533
doc.metadata["header-includes"].append(
15341534
MetaInlines(
15351535
RawInline(
1536-
dedent(
1537-
r"""
1536+
dedent(r"""
15381537
\makeatletter
15391538
\@ifpackageloaded{subfig}{
15401539
\usepackage[subfigure]{tocloft}
15411540
}{
15421541
\usepackage{tocloft}
15431542
}
15441543
\makeatother
1545-
"""
1546-
),
1544+
"""),
15471545
"tex",
15481546
)
15491547
)

tests/test_listings_meta.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def test_listing_classic(self):
2929
3030
# List of exercises {#list-of-exercises .pandoc-numbering-listing .exercise .unnumbered .unlisted}
3131
32-
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
33-
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
32+
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
33+
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
3434
3535
[**Exercise 1**]{#exercise:1 .pandoc-numbering-text .exercise .exercise-1}
3636
@@ -65,8 +65,8 @@ def test_listing_identifier_false(self):
6565
6666
# List of exercises {.pandoc-numbering-listing .exercise .unnumbered .unlisted}
6767
68-
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
69-
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
68+
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
69+
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
7070
7171
[**Exercise 1**]{#exercise:1 .pandoc-numbering-text .exercise .exercise-1}
7272
@@ -101,8 +101,8 @@ def test_listing_identifier(self):
101101
102102
# List of exercises {#myident .pandoc-numbering-listing .exercise .unnumbered .unlisted}
103103
104-
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
105-
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
104+
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
105+
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
106106
107107
[**Exercise 1**]{#exercise:1 .pandoc-numbering-text .exercise .exercise-1}
108108
@@ -139,8 +139,8 @@ def test_listing_options(self):
139139
140140
# List of exercises {#list-of-exercises .pandoc-numbering-listing .exercise}
141141
142-
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
143-
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
142+
- [[Exercise 1]{.pandoc-numbering-entry .exercise}](#exercise:1)
143+
- [[Title]{.pandoc-numbering-entry .exercise}](#exercise:2)
144144
145145
[**Exercise 1**]{#exercise:1 .pandoc-numbering-text .exercise .exercise-1}
146146
@@ -241,8 +241,8 @@ def test_listing_classic_format(self):
241241
242242
# List of exercises {#list-of-exercises .pandoc-numbering-listing .exercise .unnumbered .unlisted}
243243
244-
- [[1 Exercise]{.pandoc-numbering-entry .exercise}](#exercise:1)
245-
- [[2 Exercise (Title)]{.pandoc-numbering-entry .exercise}](#exercise:2)
244+
- [[1 Exercise]{.pandoc-numbering-entry .exercise}](#exercise:1)
245+
- [[2 Exercise (Title)]{.pandoc-numbering-entry .exercise}](#exercise:2)
246246
247247
[**Exercise 1**]{#exercise:1 .pandoc-numbering-text .exercise .exercise-1}
248248

0 commit comments

Comments
 (0)