From fe8a3108a86ab3e900adfbb04142e686c2c0a58f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 18 Jun 2019 17:22:19 +0200 Subject: [PATCH] Fix error when a deprecated alias of a deprecated module is processed. (#57774) --- docs/bin/plugin_formatter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 83a00639ee8..f253061ef31 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -274,6 +274,8 @@ def get_plugin_info(module_dir, limit_to=None, verbose=False): # Handle aliases source = os.path.splitext(os.path.basename(os.path.realpath(module_path)))[0] module = module.replace("_", "", 1) + if source.startswith("_"): + source = source.replace("_", "", 1) aliases = module_info[source].get('aliases', set()) aliases.add(module) aliases_deprecated = module_info[source].get('aliases_deprecated', set())