diff --git a/pospell.py b/pospell.py index ca36a39..7a4f674 100644 --- a/pospell.py +++ b/pospell.py @@ -1,30 +1,30 @@ """pospell is a spellcheckers for po files containing reStructuedText.""" -import io -from string import digits -from unicodedata import category import collections import functools +import io import logging import multiprocessing import os import subprocess import sys -from typing import List, Tuple from contextlib import redirect_stderr from itertools import chain from pathlib import Path from shutil import which +from string import digits +from typing import List, Tuple +from unicodedata import category import docutils.frontend import docutils.nodes import docutils.parsers.rst import polib +import regex from docutils.parsers.rst import roles from docutils.utils import new_document +from sphinxlint import rst -import regex - -__version__ = "1.2" +__version__ = "1.3" DEFAULT_DROP_CAPITALIZED = {"fr": True, "fr_FR": True} @@ -138,6 +138,7 @@ def strip_rst(line): if line.endswith("::"): # Drop :: at the end, it would cause Literal block expected line = line[:-2] + line = rst.NORMAL_ROLE_RE.sub("", line) settings = docutils.frontend.get_default_settings() settings.pep_references = None settings.rfc_references = None diff --git a/pyproject.toml b/pyproject.toml index b374762..7bafa93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "polib", "docutils>=0.18", "regex", + "sphinx-lint>=0.6.8", ] dynamic = [ "version",