Skip to content

Commit 12dc1a7

Browse files
authored
Merge pull request #47 from regisb/regisb/featuretoggle-warnings
[BD-21] Add support for warnings in the `featuretoggles` Sphinx extension
2 parents b263c6c + 76ea9d4 commit 12dc1a7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Change Log
1111

1212
.. There should always be an "Unreleased" section for changes pending release.
1313
14+
[0.5.1] - 2020-08-25
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
* Add support for warnings in the ``featuretoggles`` Sphinx extension
18+
1419
[0.5.0] - 2020-08-06
1520
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1621

code_annotations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Extensible tools for parsing annotations in codebases.
33
"""
44

5-
__version__ = '0.5.0'
5+
__version__ = '0.5.1'

code_annotations/config_and_tools/sphinx/extensions/featuretoggles.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ def iter_nodes(self):
115115
),
116116
)
117117
yield nodes.paragraph(text=toggle.get(".. toggle_description:", ""))
118+
if toggle.get(".. toggle_warnings:") not in (None, "None", "n/a", "N/A"):
119+
yield nodes.warning(
120+
"", nodes.paragraph("", toggle[".. toggle_warnings:"])
121+
)
118122

119123

120124
def quote_value(value):

0 commit comments

Comments
 (0)