Make set_config_help_action work with submodules (#2561)

This commit is contained in:
Abdo 2023-06-28 04:46:02 +03:00 committed by GitHub
parent 01f9c600af
commit df3fa5a0be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -630,7 +630,8 @@ class AddonManager:
def set_config_help_action(self, module: str, action: Callable[[], str]) -> None:
"Set a callback used to produce config help."
self._config_help_actions[module] = action
addon = self.addonFromModule(module)
self._config_help_actions[addon] = action
def addonConfigHelp(self, module: str) -> str:
if action := self._config_help_actions.get(module, None):