2626
2727async 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
9481async 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