We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12a175d commit 9465a23Copy full SHA for 9465a23
src/ansiblelint/generate_docs.py
@@ -3,7 +3,13 @@
3
from typing import Iterable
4
5
from rich import box
6
-from rich.console import render_group
+
7
+# Remove this compatibility try-catch block once we drop support for rich < 10.7.0
8
+try:
9
+ from rich.console import group
10
+except ImportError:
11
+ from rich.console import render_group as group
12
13
from rich.markdown import Markdown
14
from rich.table import Table
15
@@ -47,7 +53,7 @@ def rules_as_rst(rules: RulesCollection) -> str:
47
53
return r
48
54
49
55
50
-@render_group()
56
+@group()
51
57
def rules_as_rich(rules: RulesCollection) -> Iterable[Table]:
52
58
"""Print documentation for a list of rules, returns empty string."""
59
width = max(16, *[len(rule.id) for rule in rules])
0 commit comments