From d2b2a5bd8c973335cc15f1d550bd7a21805e27f2 Mon Sep 17 00:00:00 2001 From: Thomas Denewiler Date: Tue, 25 Nov 2025 05:23:18 +0000 Subject: [PATCH 1/2] Fix call to updated restructuredtext-lint lint_file. The upstream package changed their API in to remove the `encoding` argument. --- src/statick_tool/plugins/tool/rstlint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statick_tool/plugins/tool/rstlint.py b/src/statick_tool/plugins/tool/rstlint.py index e7295e21..35ce4438 100644 --- a/src/statick_tool/plugins/tool/rstlint.py +++ b/src/statick_tool/plugins/tool/rstlint.py @@ -57,7 +57,7 @@ def scan(self, package: Package, level: str) -> list[Issue] | None: total_output: list[SystemMessage] = [] for src in files: - output = restructuredtext_lint.lint_file(src, None, flags) + output = restructuredtext_lint.lint_file(src, flags) total_output.extend(output) for output in total_output: From cc8615b117ccaab539792481826c9de7ea17e643 Mon Sep 17 00:00:00 2001 From: Thomas Denewiler Date: Tue, 2 Dec 2025 02:48:24 +0000 Subject: [PATCH 2/2] Pin minimum version of restructuredtext-lint to 2.0.0. --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff6169c..a0cc9c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Support for Python 3.9 in CI. +### Fixed + +- Fix call to updated restructuredtext-lint lint_file. (#556) + - The minimum supported version of restructuredtext-lint is now 2.0.0. + ### Updated - Use `|` (pipe) syntax for type hints. diff --git a/pyproject.toml b/pyproject.toml index db34827b..cb88a60c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "pyflakes", "pylint", "pyright", - "restructuredtext-lint", + "restructuredtext-lint>=2", "rstcheck", "ruff>=0.0.237", "sphinx",