From 03646d2a6070adb81535d633162874380bd29c30 Mon Sep 17 00:00:00 2001 From: JSCU-CNI <121175071+JSCU-CNI@users.noreply.github.com> Date: Mon, 17 Jun 2024 12:17:53 +0200 Subject: [PATCH] declare extension safe for parallel reads --- CHANGELOG.md | 1 + src/sphinx_argparse_cli/__init__.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d884e7..d317a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## Unreleased - Allow to add content to directive. +- Fix Sphinx warnings about parallel reads. ## 1.13.1 diff --git a/src/sphinx_argparse_cli/__init__.py b/src/sphinx_argparse_cli/__init__.py index 7b026e0..5ba82d1 100644 --- a/src/sphinx_argparse_cli/__init__.py +++ b/src/sphinx_argparse_cli/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from .version import __version__ @@ -10,7 +10,7 @@ from sphinx.application import Sphinx -def setup(app: Sphinx) -> None: +def setup(app: Sphinx) -> dict[str, Any]: app.add_css_file("custom.css") from ._logic import SphinxArgparseCli @@ -18,6 +18,8 @@ def setup(app: Sphinx) -> None: app.add_directive(SphinxArgparseCli.name, SphinxArgparseCli) app.add_config_value("sphinx_argparse_cli_prefix_document", False, "env") # noqa: FBT003 + return {"parallel_read_safe": True} + __all__ = [ "__version__",