mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 19:42:19 +00:00
doc: netlink: Fix formatting of op flags in generated .rst
Generate op flags as an inline list instead of a stringified python value. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-4-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
ebf9004136
commit
cb7351ac17
@@ -172,7 +172,7 @@ def parse_do_attributes(attrs: Dict[str, Any], level: int = 0) -> str:
|
||||
|
||||
def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
|
||||
"""Parse operations block"""
|
||||
preprocessed = ["name", "doc", "title", "do", "dump"]
|
||||
preprocessed = ["name", "doc", "title", "do", "dump", "flags"]
|
||||
linkable = ["fixed-header", "attribute-set"]
|
||||
lines = []
|
||||
|
||||
@@ -188,6 +188,8 @@ def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
|
||||
if key in linkable:
|
||||
value = rst_ref(namespace, key, value)
|
||||
lines.append(rst_fields(key, value, 0))
|
||||
if 'flags' in operation:
|
||||
lines.append(rst_fields('flags', rst_list_inline(operation['flags'])))
|
||||
|
||||
if "do" in operation:
|
||||
lines.append(rst_paragraph(":do:", 0))
|
||||
|
||||
Reference in New Issue
Block a user