Skip to content

Commit e9e9419

Browse files
committed
fix: hide private method starting with _ from the migration table
1 parent bbf0646 commit e9e9419

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/source/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,12 +649,13 @@ def render_migration_table(app: sphinx.application.Sphinx):
649649
for member_category in member_categories:
650650
method_mappings = root.findall(f'./Mapping[@Category="{member_category}"]')
651651
for method_mapping in method_mappings:
652-
type_old_name = method_mapping.get("ParentScope")
653652
member_old_name = method_mapping.get("OldName")
654-
member_new_name = method_mapping.get("NewName")
655-
if not type_old_name in mappings:
656-
mappings[type_old_name] = {"new_name": type_old_name, "members": {}}
657-
mappings[type_old_name]["members"][member_old_name] = member_new_name
653+
if member_old_name[0] != "_": # Filter out private methods
654+
type_old_name = method_mapping.get("ParentScope")
655+
member_new_name = method_mapping.get("NewName")
656+
if not type_old_name in mappings:
657+
mappings[type_old_name] = {"new_name": type_old_name, "members": {}}
658+
mappings[type_old_name]["members"][member_old_name] = member_new_name
658659

659660
json_file = xml_file.parent / "main.json"
660661
json_file.write_text(json.dumps(mappings, indent=4))

0 commit comments

Comments
 (0)