File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,31 @@ def main() -> None:
3939 print ("Disabling CODEOWNERS review requirement in GitHub ruleset..." )
4040 disable_codeowners_review_requirement ()
4141 print ("=" * 72 )
42+ print ("Updating the mkdocs.yml for mkdocstrings-python v2 compatibility..." )
43+ update_mkdocs_yml_mkdocstrings_python_v2 ()
44+ print ("=" * 72 )
4245 print ("Migration script finished. Remember to follow any manual instructions." )
4346 print ("=" * 72 )
4447
4548
49+ def update_mkdocs_yml_mkdocstrings_python_v2 () -> None :
50+ """Rename 'inventories' imports to 'inventory'."""
51+ replace_file_contents_atomically (
52+ filepath = Path ("mkdocs.yml" ),
53+ old = " import:" ,
54+ new = " inventories:" ,
55+ )
56+ replace_file_contents_atomically (
57+ filepath = Path ("mkdocs.yml" ),
58+ old = """\
59+ options:
60+ paths: ["src"]""" ,
61+ new = """\
62+ paths: ["src"]
63+ options:""" ,
64+ )
65+
66+
4667def create_dependabot_auto_merge_workflow () -> None :
4768 """Create the Dependabot auto-merge workflow file."""
4869 workflow_dir = Path (".github" ) / "workflows"
You can’t perform that action at this time.
0 commit comments