Skip to content

Commit b8e38dc

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

File tree

9 files changed

+15
-7
lines changed

9 files changed

+15
-7
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ But you might still need to adapt your code:
2727
### Cookiecutter template
2828

2929
- New warning ignores for protobuf gencode versions in pytest.
30+
- mkdocstrings: Updated the deprecated `import` config key to `inventories` in `mkdocs.yml`.
3031

3132
## Bug Fixes
3233

cookiecutter/migrate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ def main() -> None:
3434
# Add a separation line like this one after each migration step.
3535
print("=" * 72)
3636
migrate_filterwarnings(Path("pyproject.toml"))
37+
print(
38+
"Renaming the deprecated mkdocstrings `import` to `inventories` in `mkdocs.yml`..."
39+
)
40+
print("=" * 72)
41+
replace_file_contents_atomically(
42+
"mkdocs.yml", " import:", " inventories:"
43+
)
3744
print("=" * 72)
3845
print("Migration script finished. Remember to follow any manual instructions.")
3946
print("=" * 72)

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)