Two small cleanups to maintainers_include
Subsystems (2)
cover Two small cleanups to maintainers_include
Hi Jon,
This series contain two minor cleanups to maintainers_include.py:
- make it backward compatible with Python < 3.10 (according with vermin, it should now be backward-compat up to 3.6)
- keep "THE REST" at the end.
Mauro Carvalho Chehab (2):
docs: maintainers_include: restore compatibility with Python 3.6
docs: maintainers_include: keep the last entry at the end
Documentation/sphinx/maintainers_include.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.54.0
PATCH 1/2 docs: maintainers_include: restore compatibility with Python 3.6
glob root_dir parameter requires Python 3.10, which is more than our current Python minimal requirement.
--- Documentation/sphinx/maintainers_include.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/sphinx/maintainers_include.py +1 -1
@@ -143,7 +143,7 @@ class MaintainersParser: if not m: return None - doc_list = glob(m.group(1), root_dir=self.base_dir) + doc_list = glob(os.path.join(self.base_dir, m.group(1))) else: doc_list = [text]
Signature · 1 line
2.54.0
PATCH 2/2 docs: maintainers_include: keep the last entry at the end
In reply to Mauro Carvalho ChehabThe last maintainer's entry ("THE REST") is meant to be at the end. Ensure that.
While here, use a case-insensitive sort to avoid placing "iSCSI" near the end.
--- Documentation/sphinx/maintainers_include.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/sphinx/maintainers_include.py +6 -1
@@ -284,7 +284,12 @@ class MaintainersInclude(Include): self.state.document['maintainers_included'] = True - for name, fields in sorted(maint_parser.maint_entries.items()): + # Keep the last entry ("THE REST") in the end + entries = list(maint_parser.maint_entries.keys()) + entries = sorted(entries[:-1], key=str.casefold) + [entries[-1]] + + for name in entries: + fields = maint_parser.maint_entries[name] output += f" * - {name}\n" tag = "-" for field, lines in fields.items():
Signature · 1 line
2.54.0
Quoted 8 lines · Mauro Carvalho Chehab
Hi Jon,
This series contain two minor cleanups to
maintainers_include.py:- make it backward compatible with Python < 3.10 (according with vermin, it should now be backward-compat up to 3.6)
Quoted 8 lines
- keep "THE REST" at the end.
Mauro Carvalho Chehab (2):
docs:maintainers_include: restore compatibility with Python 3.6
docs:maintainers_include: keep the last entry at the endDocumentation/sphinx/maintainers_include.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Applied, thanks.
jon