Skip to content

Commit aeef3fb

Browse files
committed
Undo changes necessary for ansible-community#65.
1 parent 7094316 commit aeef3fb

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/antsibull_docs/cli/doc_commands/stable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def generate_docs_for_all_collections(venv: t.Union[VenvRunner, FakeVenvRunner],
448448
collection_install=collection_install,
449449
for_official_docsite=for_official_docsite))
450450
flog.notice('Finished writing plugin indexes')
451-
asyncio_run(output_callback_indexes(callback_plugin_contents, collection_metadata,
451+
asyncio_run(output_callback_indexes(callback_plugin_contents,
452452
dest_dir, collection_url=collection_url,
453453
collection_install=collection_install,
454454
for_official_docsite=for_official_docsite))

src/antsibull_docs/write_docs/indexes.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
async def write_callback_type_index(callback_type: str,
2828
per_collection_plugins: t.Mapping[str, t.Mapping[str, str]],
29-
collection_metadata: t.Mapping[str, AnsibleCollectionMetadata],
3029
template: Template,
3130
dest_filename: str,
3231
for_official_docsite: bool = False) -> None:
@@ -36,28 +35,16 @@ async def write_callback_type_index(callback_type: str,
3635
:arg callback_type: The callback plugin type to write the index for.
3736
:arg per_collection_plugins: Mapping of collection_name to Mapping of plugin_name to
3837
short_description.
39-
:arg collection_metadata: Dictionary mapping collection names to collection metadata objects.
4038
:arg template: A template to render the plugin index.
4139
:arg dest_filename: The destination filename.
4240
:kwarg for_official_docsite: Default False. Set to True to use wording specific for the
4341
official docsite on docs.ansible.com.
4442
"""
45-
public_per_collection_plugins = {}
46-
for collection_name, plugins in per_collection_plugins.items():
47-
public_plugins = {}
48-
collection_meta = collection_metadata[collection_name]
49-
private_plugins = collection_meta.private_plugins.get('callback') or []
50-
for plugin_name, plugin_data in plugins.items():
51-
if plugin_name not in private_plugins:
52-
public_plugins[plugin_name] = plugin_data
53-
if public_plugins:
54-
public_per_collection_plugins[collection_name] = public_plugins
55-
5643
index_contents = _render_template(
5744
template,
5845
dest_filename,
5946
callback_type=callback_type,
60-
per_collection_plugins=public_per_collection_plugins,
47+
per_collection_plugins=per_collection_plugins,
6148
for_official_docsite=for_official_docsite,
6249
)
6350

@@ -92,7 +79,6 @@ async def write_plugin_type_index(plugin_type: str,
9279

9380

9481
async def output_callback_indexes(plugin_info: PluginCollectionInfoT,
95-
collection_metadata: t.Mapping[str, AnsibleCollectionMetadata],
9682
dest_dir: str,
9783
collection_url: CollectionNameTransformer,
9884
collection_install: CollectionNameTransformer,
@@ -103,7 +89,6 @@ async def output_callback_indexes(plugin_info: PluginCollectionInfoT,
10389
10490
:arg plugin_info: Mapping of callback_type to Mapping of collection_name to Mapping of
10591
plugin_name to short_description.
106-
:arg collection_metadata: Dictionary mapping collection names to collection metadata objects.
10792
:arg dest_dir: The directory to place the documentation in.
10893
:kwarg for_official_docsite: Default False. Set to True to use wording specific for the
10994
official docsite on docs.ansible.com.
@@ -132,7 +117,7 @@ async def output_callback_indexes(plugin_info: PluginCollectionInfoT,
132117
filename = os.path.join(collection_toplevel, f'callback_index_{callback_type}.rst')
133118
writers.append(await pool.spawn(
134119
write_callback_type_index(
135-
callback_type, per_collection_data, collection_metadata, plugin_list_tmpl,
120+
callback_type, per_collection_data, plugin_list_tmpl,
136121
filename, for_official_docsite=for_official_docsite)))
137122

138123
await asyncio.gather(*writers)

0 commit comments

Comments
 (0)