Skip to content

Commit f4db215

Browse files
committed
Updated the deprecated import config key to inventories
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent b716775 commit f4db215

File tree

9 files changed

+15
-8
lines changed

9 files changed

+15
-8
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ But you might still need to adapt your code:
2626

2727
### Cookiecutter template
2828

29-
<!-- Here new features for cookiecutter specifically -->
29+
- mkdocstrings: Updated the deprecated `import` config key to `inventories` in `mkdocs.yml`.
3030

3131
## Bug Fixes
3232

cookiecutter/migrate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ def main() -> None:
3232
"""Run the migration steps."""
3333
# Add a separation line like this one after each migration step.
3434
print("=" * 72)
35+
print(
36+
"Renaming the deprecated mkdocstrings `import` to `inventories` in `mkdocs.yml`..."
37+
)
38+
replace_file_contents_atomically(
39+
"mkdocs.yml", " import:", " inventories:"
40+
)
41+
print("=" * 72)
3542
print("Migration script finished. Remember to follow any manual instructions.")
3643
print("=" * 72)
3744

cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ plugins:
114114
show_source: true
115115
show_symbol_type_toc: true
116116
signature_crossrefs: true
117-
import:
117+
inventories:
118118
- https://cookiecutter.readthedocs.io/en/stable/objects.inv
119119
- https://docs.python.org/3/objects.inv
120120
- https://mkdocstrings.github.io/objects.inv

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ plugins:
116116
show_source: true
117117
show_symbol_type_toc: true
118118
signature_crossrefs: true
119-
import:
119+
inventories:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv

0 commit comments

Comments
 (0)