From 8b24db05d42cd62642a5d3f19cd88a2d96eca24c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 20 Feb 2026 02:11:03 +0900 Subject: [PATCH] make-directive-index: apply "ruff format" --- tools/make-directive-index.py | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 5398b452ef..ddf07534ef 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -13,6 +13,7 @@ This index contains {count} entries in {sections} sections, referring to {pages} individual manual pages. ''' + def _extract_directives(directive_groups, formatting, page): t = xml_parse(page) section = t.find('./refmeta/manvolnum').text @@ -21,12 +22,13 @@ def _extract_directives(directive_groups, formatting, page): storopt = directive_groups['options'] for variablelist in t.iterfind('.//variablelist'): klass = variablelist.attrib.get('class') - searchpath = variablelist.attrib.get('xpath','./varlistentry/term/varname') + searchpath = variablelist.attrib.get('xpath', './varlistentry/term/varname') storvar = directive_groups[klass or 'miscellaneous'] #