Coverage for /builds/svesch/cikit/src/cikit/sphinx_ext/__init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.14.1, created at 2026-10-09 14:17 +0000

1# SPDX-License-Identifier: GPL-3.0-or-later 

2"""Sphinx extensions provided by cikit. 

3 

4This package exposes the individual cikit Sphinx extensions and also acts as a 

5bundle extension that enables all of them with one entry in ``extensions``. 

6Individual extensions remain available for projects that only need a subset. 

7 

8Author: 

9 Sven Schlender 

10Date: 

11 2026-09-25 

12""" 

13 

14 

15CIKIT_EXTENSIONS = ( 

16 "cikit.sphinx_ext.metrics", 

17 "cikit.sphinx_ext.chart", 

18 "cikit.sphinx_ext.log", 

19 "cikit.sphinx_ext.hash", 

20) 

21 

22 

23def setup(app): 

24 """Register all Sphinx extensions provided by cikit. 

25 

26 Each extension remains a standalone Sphinx extension and is loaded through 

27 the regular Sphinx extension mechanism. This keeps direct use of individual 

28 cikit extensions possible while providing one convenient bundle entry. 

29 

30 Args: 

31 app: Active Sphinx application. 

32 

33 Returns: 

34 Sphinx extension metadata. 

35 """ 

36 for extension in CIKIT_EXTENSIONS: 

37 app.setup_extension(extension) 

38 

39 return {"version": "1.0", "parallel_read_safe": True, "parallel_write_safe": True}